1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-09-19 14:05:53 +02:00
.profile/app/error.tsx

22 lines
407 B
TypeScript
Raw Normal View History

'use client'
import { useEffect } from 'react'
import { ErrorPage } from '@/components/ErrorPage'
export interface ErrorHandlingProps {
error: Error
}
const ErrorHandling = (props: ErrorHandlingProps): JSX.Element => {
const { error } = props
useEffect(() => {
console.error(error)
}, [error])
return <ErrorPage statusCode={500} message='Server error' />
}
export default ErrorHandling