import React, { useEffect } from 'react'; import { useDispatch } from 'react-redux'; import { Link } from 'react-router-dom'; import { logOut } from 'soapbox/actions/auth'; import { openModal } from 'soapbox/actions/modals'; import LandingGradient from 'soapbox/components/landing-gradient'; import SiteLogo from 'soapbox/components/site-logo'; import { Button, Stack, Text } from 'soapbox/components/ui'; import { useAppSelector, useOwnAccount } from 'soapbox/hooks'; const WaitlistPage = (/* { account } */) => { const dispatch = useDispatch(); const title = useAppSelector((state) => state.instance.title); const me = useOwnAccount(); const isSmsVerified = me?.source.get('sms_verified'); const onClickLogOut: React.MouseEventHandler = (event) => { event.preventDefault(); dispatch(logOut()); }; const openVerifySmsModal = () => dispatch(openModal('VERIFY_SMS')); useEffect(() => { if (!isSmsVerified) { openVerifySmsModal(); } }, []); return (