// src/components/auth/VerifyOtpForm.tsx "use client"; import { useSearchParams } from "next/navigation"; import { Form, FormControl, FormDescription, FormField, FormItem, FormMessage, } from "@/app/_components/ui/form"; import { InputOTP, InputOTPGroup, InputOTPSlot, } from "@/app/_components/ui/input-otp"; import { SubmitButton } from "@/app/_components/submit-button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/app/_components/ui/card"; import { cn } from "@/app/_lib/utils"; import { useVerifyOtpForm } from "@/src/controller/auth/verify-otp.controller"; interface VerifyOtpFormProps extends React.HTMLAttributes {} export function VerifyOtpForm({ className, ...props }: VerifyOtpFormProps) { const searchParams = useSearchParams(); const email = searchParams.get("email") || ""; const { form, isSubmitting, message, onSubmit } = useVerifyOtpForm(email); return (
One-Time Password One time password is a security feature that helps protect your data
( {[...Array(6)].map((_, index) => ( ))} Please enter the one-time password sent to {email}. )} />
Submit
{message && (
{message}
)}
By clicking continue, you agree to our Terms of Service{" "} and Privacy Policy.
); }