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