The frontend was built against HeroUI v2 props/classes (variant="light"/"flat", color="primary", startContent, text-tiny, <Avatar src=/name=>) while @heroui/react ^3.2.1 is installed, so most styling was silently ignored. Rewrites every page/component onto the actual v3 API (variant/color enums, Tooltip/Dropdown trigger-content structure, Avatar.Image/Fallback via a new AppAvatar helper) and replaces the custom orange branding with HeroUI's neutral default theme tokens. Also compacts the dashboard stat tiles, narrows the sidebar, and swaps the activity stat grid for a single-hue comparison bar chart. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
26 lines
900 B
TypeScript
26 lines
900 B
TypeScript
import { Card, CardContent } from '@heroui/react';
|
|
import { AlertTriangle, RefreshCw } from 'lucide-react';
|
|
|
|
type Props = {
|
|
message?: string;
|
|
onRetry?: () => void;
|
|
};
|
|
|
|
export function ErrorState({ message = 'Ein Fehler ist aufgetreten', onRetry }: Props) {
|
|
return (
|
|
<Card className="border border-danger-soft bg-danger-soft/40">
|
|
<CardContent className="flex flex-col items-center gap-3 py-8">
|
|
<div className="flex size-12 items-center justify-center rounded-full bg-danger-soft text-danger">
|
|
<AlertTriangle size={24} />
|
|
</div>
|
|
<p className="text-sm text-muted">{message}</p>
|
|
{onRetry && (
|
|
<button className="flex items-center gap-1 text-xs text-accent hover:opacity-80 transition-opacity" onClick={onRetry}>
|
|
<RefreshCw size={12} /> Erneut versuchen
|
|
</button>
|
|
)}
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
}
|