1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-12-08 00:44:30 +01:00
.profile/app/error.tsx

33 lines
675 B
TypeScript
Raw Normal View History

"use client"
import { useEffect } from "react"
export interface ErrorHandlingProps {
error: Error
}
const ErrorHandling = (props: ErrorHandlingProps): JSX.Element => {
const { error } = props
useEffect(() => {
console.error(error)
}, [error])
2023-08-01 18:18:16 +02:00
return (
<main className="flex flex-1 flex-col items-center justify-center">
<h1 className="my-6 text-4xl font-semibold">
Error{" "}
2023-08-01 18:18:16 +02:00
<span
2024-04-06 20:25:02 +02:00
className="text-primary dark:text-primary-dark"
data-cy="status-code"
2023-08-01 18:18:16 +02:00
>
500
</span>
</h1>
<p className="text-center text-lg">Server error</p>
2023-08-01 18:18:16 +02:00
</main>
)
}
export default ErrorHandling