Add artists page
This commit is contained in:
31
src/app/error.tsx
Normal file
31
src/app/error.tsx
Normal file
@ -0,0 +1,31 @@
|
||||
'use client' // Error boundaries must be Client Components
|
||||
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export default function Error({
|
||||
error,
|
||||
reset,
|
||||
}: {
|
||||
error: Error & { digest?: string }
|
||||
reset: () => void
|
||||
}) {
|
||||
useEffect(() => {
|
||||
// Log the error to an error reporting service
|
||||
console.error(error)
|
||||
}, [error])
|
||||
|
||||
return (
|
||||
<div className="flex h-screen flex-col items-center justify-center bg-destructive/5 px-4 text-center">
|
||||
<h1 className="text-3xl font-bold text-destructive">Something went wrong</h1>
|
||||
<p className="mt-2 text-muted-foreground">
|
||||
Please try refreshing the page or contact support if the problem persists.
|
||||
</p>
|
||||
<button
|
||||
onClick={reset}
|
||||
className="mt-6 rounded-lg bg-destructive px-4 py-2 text-white hover:bg-destructive/80"
|
||||
>
|
||||
Try Again
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user