united-tattoo/app/error.tsx
Nicholai 16cee69250 __Admin dashboard scaffolded with D1 database and R2 file uploads__
This commit implements the core admin dashboard functionality including NextAuth authentication, Cloudflare D1 database integration with complete schema, and Cloudflare R2 file upload system for portfolio images. Features include artist management, appointment scheduling, and data migration capabilities.
2025-09-17 16:08:34 -06:00

34 lines
833 B
TypeScript

"use client"
import React, { useEffect } from "react"
export default function GlobalError({
error,
reset,
}: {
error: Error & { digest?: string }
reset: () => void
}) {
useEffect(() => {
// Log the error for debugging
console.error(error)
}, [error])
return (
<div className="min-h-[50vh] flex items-center justify-center p-8">
<div className="text-center space-y-3">
<h2 className="text-xl font-semibold">Something went wrong</h2>
<p className="text-sm text-muted-foreground">
{error?.message || "An unexpected error occurred."}
</p>
<button
onClick={() => reset()}
className="inline-flex items-center rounded-md border px-3 py-1.5 text-sm hover:bg-accent"
>
Try again
</button>
</div>
</div>
)
}