import { t, Trans } from "@lingui/macro"; import { ArrowRight, Info, SealCheck } from "@phosphor-icons/react"; import { Alert, AlertDescription, AlertTitle, Button } from "@reactive-resume/ui"; import { useEffect } from "react"; import { Helmet } from "react-helmet-async"; import { Link, useNavigate, useSearchParams } from "react-router"; import { useToast } from "@/client/hooks/use-toast"; import { queryClient } from "@/client/libs/query-client"; import { useVerifyEmail } from "@/client/services/auth"; export const VerifyEmailPage = () => { const { toast } = useToast(); const navigate = useNavigate(); const [searchParams] = useSearchParams(); const token = searchParams.get("token"); const { verifyEmail, loading } = useVerifyEmail(); useEffect(() => { const handleVerifyEmail = async (token: string) => { await verifyEmail({ token }); await queryClient.invalidateQueries({ queryKey: ["user"] }); toast({ variant: "success", icon: , title: t`Your email address has been verified successfully.`, }); void navigate("/dashboard/resumes", { replace: true }); }; if (!token) return; void handleVerifyEmail(token); }, [token, navigate, verifyEmail]); return (
{t`Verify your email address`} - {t`Reactive Resume`}

{t`Verify your email address`}

You should have received an email from Reactive Resume with a link to verify your account.

{t`Please note that this step is completely optional.`} {t`We verify your email address only to ensure that we can send you a password reset link in case you forget your password.`}
); };