'use client'; import { useEffect } from 'react'; import Link from 'next/link'; import { AlertCircle, RotateCcw } from 'lucide-react'; import { Button } from '@/components/ui/button'; interface ErrorProps { error: Error & { digest?: string }; reset: () => void; } export default function DashboardError({ error, reset }: ErrorProps) { useEffect(() => { // Forward to the browser console so the dev sees the stack while the // user sees the friendly UI. The server already wrote an error_events // row through the page-level error pipeline. console.error('Dashboard render error:', error); }, [error]); return (

Something went wrong

The page hit an unexpected error. The team has been notified {error.digest ? ' (ref: ' : '.'} {error.digest ? {error.digest} : null} {error.digest ? ').' : ''}

Back to dashboard
); }