feat: enhance error handling in DashboardPage and add retry functionality
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user