(
answer: PatchyOfferAnswer,
button?: 'primary' | 'secondary',
)
| 88 | }, [box]); |
| 89 | |
| 90 | const leave = ( |
| 91 | answer: PatchyOfferAnswer, |
| 92 | button?: 'primary' | 'secondary', |
| 93 | ) => { |
| 94 | if (isLeaving) { |
| 95 | return; |
| 96 | } |
| 97 | answerRef.current = { answer, button }; |
| 98 | setIsLeaving(true); |
| 99 | setIsIn(false); |
| 100 | }; |
| 101 | |
| 102 | useEffect(() => { |
| 103 | if (!isLeaving || !answerRef.current) { |