import {FC, useState} from "react"; import {useLocation, useNavigate} from "react-router-dom"; import './VerifyMail.css'; import {Helmet} from "react-helmet"; interface VerificationData { eMail: string; code: string; } const VerifyMail: FC = () => { const navigate = useNavigate() const location = useLocation(); const [code, setCode] = useState('000000'); if (location.state === null || location.state.email === undefined) { return (
Are you in the right place? It doesn't look like you have an email to verify!
Hi, you just completed a form and need to verify your email ({email}).
Please check your email for a verification code and enter it below:
{ if (/^\d{0,6}$/.test(e.target.value)) { setCode(e.target.value); } }} pattern="\d{6}" maxLength={6} className="verification-code-input" />