diff --git a/web/src/pages/Verify/Email/OTP/index.tsx b/web/src/pages/Verify/Email/OTP/index.tsx index b166416..66f02a8 100644 --- a/web/src/pages/Verify/Email/OTP/index.tsx +++ b/web/src/pages/Verify/Email/OTP/index.tsx @@ -1,9 +1,21 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; -import { type FC } from "react"; -import { Link } from "react-router"; +import { useVerify } from "@/store/verify"; +import { useCallback, useState, type FC } from "react"; const VerifyEmailOtpPage: FC = () => { + const [otp, setOtp] = useState(""); + + const confirmOtp = useVerify((s) => s.confirmOTP); + const confirming = useVerify((s) => s.confirming); + + const handleVerify = useCallback(() => { + if (otp.length !== 6) return; + confirmOtp({ + otp, + }); + }, [confirmOtp, otp]); + return (