diff --git a/src/app/demand/error.tsx b/src/app/demand/error.tsx new file mode 100644 index 0000000..6163727 --- /dev/null +++ b/src/app/demand/error.tsx @@ -0,0 +1,30 @@ +'use client'; + +import { Button } from '@/components/ui/button.js'; +import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@/components/ui/card.js'; +import { AlertCircle } from 'lucide-react'; + +export default function DemandError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) { + return ( +
+ + + + + Demand data failed to load + + + +

+ {error.message || 'An unexpected error occurred while loading demand analysis.'} +

+
+ + + +
+
+ ); +} diff --git a/src/app/error.tsx b/src/app/error.tsx new file mode 100644 index 0000000..6eb1a90 --- /dev/null +++ b/src/app/error.tsx @@ -0,0 +1,30 @@ +'use client'; + +import { Button } from '@/components/ui/button.js'; +import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@/components/ui/card.js'; +import { AlertCircle } from 'lucide-react'; + +export default function DashboardError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) { + return ( +
+ + + + + Something went wrong + + + +

+ {error.message || 'An unexpected error occurred while loading the dashboard.'} +

+
+ + + +
+
+ ); +} diff --git a/src/app/generation/error.tsx b/src/app/generation/error.tsx new file mode 100644 index 0000000..b197b0b --- /dev/null +++ b/src/app/generation/error.tsx @@ -0,0 +1,30 @@ +'use client'; + +import { Button } from '@/components/ui/button.js'; +import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@/components/ui/card.js'; +import { AlertCircle } from 'lucide-react'; + +export default function GenerationError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) { + return ( +
+ + + + + Generation data failed to load + + + +

+ {error.message || 'An unexpected error occurred while loading generation mix data.'} +

+
+ + + +
+
+ ); +} diff --git a/src/app/map/error.tsx b/src/app/map/error.tsx new file mode 100644 index 0000000..c008a2c --- /dev/null +++ b/src/app/map/error.tsx @@ -0,0 +1,30 @@ +'use client'; + +import { Button } from '@/components/ui/button.js'; +import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@/components/ui/card.js'; +import { AlertCircle } from 'lucide-react'; + +export default function MapError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) { + return ( +
+ + + + + Map failed to load + + + +

+ {error.message || 'An unexpected error occurred while loading the map.'} +

+
+ + + +
+
+ ); +} diff --git a/src/app/trends/error.tsx b/src/app/trends/error.tsx new file mode 100644 index 0000000..ca3b4f2 --- /dev/null +++ b/src/app/trends/error.tsx @@ -0,0 +1,30 @@ +'use client'; + +import { Button } from '@/components/ui/button.js'; +import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@/components/ui/card.js'; +import { AlertCircle } from 'lucide-react'; + +export default function TrendsError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) { + return ( +
+ + + + + Trends failed to load + + + +

+ {error.message || 'An unexpected error occurred while loading price trends.'} +

+
+ + + +
+
+ ); +}