'use client'; import { useActionState } from 'react'; import { Button } from '@/components/ui/Button'; import { verifyMfaAction, type ChallengeState } from '@/server/auth/actions'; const empty: ChallengeState = {}; export function MfaChallengeForm() { const [state, formAction, pending] = useActionState(verifyMfaAction, empty); return (
{state.error ? (

{state.error}

) : null}
); }