- Reorganize into apps/, packages/, docs/, e2e/, pocketbase/ directories - Add Dockerfiles for web, worker, and PocketBase services - Add docker-compose.yml for local orchestration - Add turbo.json for monorepo task management - Add Playwright e2e test infrastructure - Add PocketBase backend with migrations - Remove Vite/Next.js/ESLint/PostCSS config files - Update package.json with workspace dependencies - Add .env.example and .dockerignore
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
'use client';
|
|
|
|
import { useEffect } from 'react';
|
|
import { Button } from '@/components/ui/button';
|
|
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@/components/ui/card';
|
|
|
|
export default function Error({
|
|
error,
|
|
reset,
|
|
}: {
|
|
error: Error & { digest?: string };
|
|
reset: () => void;
|
|
}) {
|
|
useEffect(() => {
|
|
console.error('Application error:', error);
|
|
}, [error]);
|
|
|
|
return (
|
|
<div className="flex min-h-[50vh] items-center justify-center p-6">
|
|
<Card className="max-w-md w-full">
|
|
<CardHeader>
|
|
<CardTitle>Something went wrong</CardTitle>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<p className="text-muted-foreground">
|
|
An unexpected error occurred. Please try again or contact support
|
|
if the problem persists.
|
|
</p>
|
|
{error.digest && (
|
|
<p className="mt-2 text-xs text-muted-foreground font-mono">
|
|
Error ID: {error.digest}
|
|
</p>
|
|
)}
|
|
</CardContent>
|
|
<CardFooter className="flex gap-2">
|
|
<Button onClick={reset}>Try again</Button>
|
|
<Button
|
|
variant="outline"
|
|
onClick={() => (window.location.href = '/')}
|
|
>
|
|
Go home
|
|
</Button>
|
|
</CardFooter>
|
|
</Card>
|
|
</div>
|
|
);
|
|
}
|