'use client'; interface Props { error: Error | string | null; onRetry?: () => void; variant?: 'inline' | 'page' | 'toast'; } export default function ErrorDisplay({ error, onRetry, variant = 'inline' }: Props) { if (!error) return null; const message = typeof error === 'string' ? error : error.message; if (variant === 'toast') { return (
{message}
{onRetry && }