({
error,
reset,
}: {
error: Error & { digest?: string }
reset: () => void
})
| 4 | import {Button} from "@heroui/button"; |
| 5 | |
| 6 | export default function Error({ |
| 7 | error, |
| 8 | reset, |
| 9 | }: { |
| 10 | error: Error & { digest?: string } |
| 11 | reset: () => void |
| 12 | }) { |
| 13 | useEffect(() => { |
| 14 | console.error(error) |
| 15 | }, [error]) |
| 16 | |
| 17 | return ( |
| 18 | <div className='h-full flex items-center justify-center space-y-6'> |
| 19 | <div className='flex flex-col items-center text-center gap-6'> |
| 20 | <h1 className='text-5xl font-bold'>Something went wrong!</h1> |
| 21 | <h3 className='text-3xl text-danger-600'>{error.message}</h3> |
| 22 | <Button |
| 23 | color='primary' |
| 24 | onPress={ |
| 25 | () => reset() |
| 26 | } |
| 27 | > |
| 28 | Try again |
| 29 | </Button> |
| 30 | </div> |
| 31 | |
| 32 | </div> |
| 33 | ) |
| 34 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…