import { Form, FormControl, FormField, FormItem } from "../ui/form"; import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, } from "../ui/input-otp"; import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import { totpSchema, TotpSchema } from "@/schemas/totp-schema"; interface Props { formId: string; onSubmit: (code: TotpSchema) => void; loading?: boolean; } export const TotpForm = (props: Props) => { const { formId, onSubmit, loading } = props; const form = useForm({ resolver: zodResolver(totpSchema), }); return (
( )} /> ); };