"use client"; import { useActionState } from "react"; import { login, register } from "@/app/actions/auth"; export default function AuthForm({ isRegister = false }: { isRegister?: boolean }) { const [state, formAction] = useActionState(isRegister ? register : login, null); return (