diff options
author | Eric Bailey <git@esb.lol> | 2023-12-12 17:18:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 15:18:38 -0800 |
commit | b1f9454f1d4404bed9b1b3c656d5f9bbe1d4d39c (patch) | |
tree | de9774fe19fccd813a2c497e6915b9be9b2901c6 /src/view/com/modals/VerifyEmail.tsx | |
parent | bf9cedb67bacd1e2667bd1719aadcee92f234966 (diff) | |
download | voidsky-b1f9454f1d4404bed9b1b3c656d5f9bbe1d4d39c.tar.zst |
Add fallback to email reminder modal (#2193)
* Add fallback to email reminder modal * Add more debug
Diffstat (limited to 'src/view/com/modals/VerifyEmail.tsx')
-rw-r--r-- | src/view/com/modals/VerifyEmail.tsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/view/com/modals/VerifyEmail.tsx b/src/view/com/modals/VerifyEmail.tsx index 786a814a7..4f2b1aadf 100644 --- a/src/view/com/modals/VerifyEmail.tsx +++ b/src/view/com/modals/VerifyEmail.tsx @@ -22,6 +22,7 @@ import {Trans, msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useModalControls} from '#/state/modals' import {useSession, useSessionApi, getAgent} from '#/state/session' +import {logger} from '#/logger' export const snapPoints = ['90%'] @@ -45,6 +46,13 @@ export function Component({showReminder}: {showReminder?: boolean}) { const {isMobile} = useWebMediaQueries() const {openModal, closeModal} = useModalControls() + React.useEffect(() => { + if (!currentAccount) { + logger.error(`VerifyEmail modal opened without currentAccount`) + closeModal() + } + }, [currentAccount, closeModal]) + const onSendEmail = async () => { setError('') setIsProcessing(true) |