mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-11-05 04:51:30 +01:00
Théo LUDWIG
6b29ce9b15
Improvements: - Hide switch theme input (ugly little white square) - i18n without subpath (e.g: /fr or /en), same url whatever the locale used
22 lines
407 B
TypeScript
22 lines
407 B
TypeScript
'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
|