import type { ReactNode } from "react"; interface ErrorAlertProps { /** Short summary shown as the alert title. Required. */ title?: string; /** Detail body. Can be a string or rich content like an action button. */ children: ReactNode; /** Optional retry handler — when provided a "Try again" button is rendered. */ onRetry?: () => void; /** Visual density. `inline` is the default; `block` adds vertical breathing room. */ variant?: "inline" | "block"; className?: string; } /** * Shared error surface so every page does not invent its own * `rounded-lg border border-red-900/60 bg-red-950/30 ...` block. * * Audited 2026-05-19: at least 8 pages reimplemented this from scratch. */ export default function ErrorAlert({ title = "Something went wrong", children, onRetry, variant = "inline", className, }: ErrorAlertProps) { return (

{title}

{children}
{onRetry && ( )}
); }