"use client"; import { useActionState } from "react"; import Link from "next/link"; import { login } from "@/lib/actions/auth"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; export function LoginForm({ showSignupLink }: { showSignupLink: boolean }) { const [state, action, pending] = useActionState(login, undefined); return ( Welcome back Log in to your board.
{state?.error &&

{state.error}

}
{showSignupLink && (

Don't have an account?{" "} Sign up

)}
); }