
import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert";
import { Link } from "react-router-dom";

interface AuthErrorProps {
  title?: string;
  description: string;
}

export function AuthError({ title = "Erreur de vérification", description }: AuthErrorProps) {
  return (
    <Alert variant="destructive" className="mb-6">
      <AlertTitle>{title}</AlertTitle>
      <AlertDescription>{description}</AlertDescription>
      <div className="mt-4">
        <Link to="/login" className="font-semibold text-primary hover:underline">
          Retourner à la page de connexion
        </Link>
      </div>
    </Alert>
  );
}
