diff --git a/web/src/layout/VerificationLayout.tsx b/web/src/layout/VerificationLayout.tsx index b1f863c..9292487 100644 --- a/web/src/layout/VerificationLayout.tsx +++ b/web/src/layout/VerificationLayout.tsx @@ -3,7 +3,7 @@ import { useAuth } from "@/store/auth"; import { useVerify } from "@/store/verify"; import { Eye, MailCheck, ScanFace } from "lucide-react"; import { useEffect, type FC } from "react"; -import { Outlet, useLocation } from "react-router"; +import { Navigate, Outlet, useLocation } from "react-router"; const steps = [ { @@ -37,6 +37,18 @@ const VerificationLayout: FC = () => { if (profile) loadStep(profile); }, [loadStep, profile]); + if (step === "email" && !location.pathname.startsWith("/verify/email")) { + return ; + } + + if (step === "avatar" && !location.pathname.startsWith("/verify/avatar")) { + return ; + } + + if (step === "review" && !location.pathname.startsWith("/verify/review")) { + return ; + } + return (