"use client"; import NextLink from "next/link"; import { useActionState } from "react"; import { Link } from "@unlocalhosted/metalui"; import { loginAction, signupAction, twoFactorLoginAction } from "@/app/actions/auth"; import { TextField } from "./settings-fields"; import { Alert, Button } from "./ui"; export function LoginForm({ next }: { next: string }) { const [state, action, pending] = useActionState(loginAction, undefined); return (
{state?.error && {state.error}} ); } export function TwoFactorLoginForm({ next }: { next: string }) { const [state, action, pending] = useActionState(twoFactorLoginAction, undefined); return (
{state?.error && {state.error}} ); } export function SignupForm({ next }: { next: string }) { const [state, action, pending] = useActionState(signupAction, undefined); return (
{state?.error && {state.error}}

Already have an account?{" "} }>Sign in

); }