Skip to content

Commit

Permalink
refact: remove console log and move set pending
Browse files Browse the repository at this point in the history
  • Loading branch information
koremp committed Mar 30, 2024
1 parent 8fab698 commit 8fba0e2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/Ask/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ const Ask = () => {
}

try {
console.log('before await')
await client().sendRequest(content, candidates.filter(c => c.checked).map(c => c.id))
console.log('after await')
alert('질문이 등록 되었습니다.\n연락처가 존재하는 후보에게는 질문이 메일로 전달됩니다.')
setPending(false)
}
catch(e)
{
Expand All @@ -129,7 +128,6 @@ const Ask = () => {

if(pending) {
debounce(ask())
setPending(false)
}
}, [pending, candidates])

Expand Down Expand Up @@ -214,13 +212,13 @@ const Ask = () => {
</div>

<div>
<button className="askButton" onClick={() => { setPending(true)}} >
<button className="askButton" onClick={() => { setPending(true) }} >
질문 보내기
</button>
</div>


{ pending && <Modal/> }
{ pending && <Modal /> }
</div>
)
}
Expand Down

0 comments on commit 8fba0e2

Please sign in to comment.