'use client'; import { useActionState } from 'react'; import { useFormStatus } from 'react-dom'; import { authenticate } from '@/app/actions/auth'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import Link from 'next/link'; function LoginButton() { const { pending } = useFormStatus(); return ( ); } export function LoginForm({ allowRegister = true }: { allowRegister?: boolean }) { const [errorMessage, dispatch] = useActionState(authenticate, undefined); return (
); }