"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() { const [state, action, pending] = useActionState(login, undefined); return ( Se connecter Accède à tes besoins et tes offres.
{state?.errors?.email && (

{state.errors.email[0]}

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

{state.errors.password[0]}

)}
{state?.message && (

{state.message}

)}

Pas encore de compte ?{" "} S'inscrire

); }