feat: enhance error handling in DashboardPage and add retry functionality
Some checks failed
Frontend CI / lint (push) Failing after 29s
Frontend CI / build (push) Has been skipped

This commit is contained in:
JSC
2025-08-19 21:49:46 +02:00
parent b76b34ea4f
commit 77f24ea4ff
3 changed files with 58 additions and 27 deletions

View File

@@ -56,7 +56,7 @@ export function LoadingSkeleton() {
)
}
export function ErrorState({ error }: { error: string }) {
export function ErrorState({ error, onRetry }: { error: string; onRetry: () => void }) {
return (
<AppLayout
breadcrumb={{
@@ -64,7 +64,7 @@ export function ErrorState({ error }: { error: string }) {
}}
>
<div className="flex-1 rounded-xl bg-muted/50 p-4">
<DashboardHeader onRefresh={() => {}} isRefreshing={false} />
<DashboardHeader onRefresh={onRetry} isRefreshing={false} />
<div className="border-2 border-dashed border-destructive/25 rounded-lg p-4">
<p className="text-destructive">Error loading statistics: {error}</p>
</div>