"use client"
import { useEffect } from "react"
export default function Error({
error,
reset,
}: {
error: Error & { digest?: string }
reset: () => void
}) {
useEffect(() => {
console.error(error)
}, [error])
return (
<div className="min-h-screen bg-background flex items-center justify-center p-4">
<div className="text-center space-y-6">
<div className="space-y-2">
<h1 className="text-6xl font-bold text-primary">500</h1>
<h2 className="text-xl font-semibold text-foreground">
Something went wrong
</h2>
<p className="text-muted-foreground max-w-md">
An unexpected error occurred. Please try again.
</p>
</div>
<button
onClick={reset}
className="inline-flex items-center justify-center rounded-md bg-primary px-6 py-2.5 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors"
>
Try Again
</button>
</div>
</div>
)
}