472d87c829
- Add error.tsx to all 13 route groups: admin, allocations, analytics, dashboard, estimates, notifications, projects, reports, resources, roles, staffing, timeline, vacations - Add loading.tsx to 9 routes that were missing them: admin, analytics, dashboard, estimates, notifications, reports, roles, staffing, vacations - ResourceDetail: wrap vacationStart in useMemo to stabilize query key, remove dead windowEnd variable - node-renderer.ts: replace barrel import (import * as THREE) with named imports for tree-shaking - next.config.ts: add framer-motion and @capakraken/shared to optimizePackageImports Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 lines
418 B
TypeScript
11 lines
418 B
TypeScript
"use client";
|
|
export default function RouteError({ error, reset }: { error: Error; reset: () => void }) {
|
|
return (
|
|
<div className="p-6 text-center">
|
|
<h2 className="text-lg font-semibold">Something went wrong</h2>
|
|
<p className="text-sm text-gray-500 mt-1">{error.message}</p>
|
|
<button onClick={reset} className="mt-4 px-4 py-2 bg-blue-600 text-white rounded">Try again</button>
|
|
</div>
|
|
);
|
|
}
|