'use client' import styles from '@/app/styles/login.module.scss'; import { useActionState } from 'react'; import { registration } from '@/app/actions/auth'; import PhoneInput from '@/app/ui/inputs/phone-input'; export default function RegisterForm() { const [state, formAction, isPending] = useActionState( registration, undefined, ); return (
{ formAction(e); }}>
{state?.error?.full_name && (

{state?.error?.full_name}

)}
{state?.error?.email && (

{state?.error?.email}

)}
{state?.error?.phone && (

{state?.error?.phone}

)}
{state?.error?.password && (

{state?.error?.password}

)}
{state?.error?.confirm_password && (

{state?.error?.confirm_password}

)}
{state?.error?.agree && (

{state?.error?.agree}

)} {state?.error?.server && (

{state?.error?.server}

)}
) }