diff --git a/web/src/layout/VerificationLayout.tsx b/web/src/layout/VerificationLayout.tsx new file mode 100644 index 0000000..b1f863c --- /dev/null +++ b/web/src/layout/VerificationLayout.tsx @@ -0,0 +1,51 @@ +import { Stepper } from "@/components/ui/stepper"; +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"; + +const steps = [ + { + id: "email", + icon: , + label: "Verify Email", + description: "Confirm your address", + }, + { + id: "avatar", + icon: , + label: "Profile Picture", + description: "Add profile image", + }, + { + id: "review", + icon: , + label: "Done", + description: "Review & Quit", + }, +]; + +const VerificationLayout: FC = () => { + const location = useLocation(); + const profile = useAuth((s) => s.profile); + + const step = useVerify((s) => s.step); + const loadStep = useVerify((s) => s.loadStep); + + useEffect(() => { + if (profile) loadStep(profile); + }, [loadStep, profile]); + + return ( +
+
+ {location.pathname.replace(/\/$/i, "") !== "/verify" && + step != null && } + +
+
+ ); +}; + +export default VerificationLayout;