mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-12-12 20:46:52 +01:00
perf!: monorepo setup + fully static + webp images
BREAKING CHANGE: minimum supported Node.js >= 22.0.0 and pnpm >= 9.5.0
This commit is contained in:
37
packages/ui/src/Errors/ErrorServer/ErrorServer.tsx
Normal file
37
packages/ui/src/Errors/ErrorServer/ErrorServer.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
"use client"
|
||||
|
||||
import { useTranslations } from "next-intl"
|
||||
import { useEffect } from "react"
|
||||
import { MainLayout } from "../../MainLayout/MainLayout"
|
||||
import { Button } from "../../design/Button/Button"
|
||||
import { Section } from "../../design/Section/Section"
|
||||
import { Typography } from "../../design/Typography/Typography"
|
||||
|
||||
export interface ErrorServerProps {
|
||||
error: Error & { digest?: string }
|
||||
reset: () => void
|
||||
}
|
||||
|
||||
export const ErrorServer: React.FC<ErrorServerProps> = (props) => {
|
||||
const { error, reset } = props
|
||||
|
||||
const t = useTranslations()
|
||||
|
||||
useEffect(() => {
|
||||
console.error(error)
|
||||
}, [error])
|
||||
|
||||
return (
|
||||
<MainLayout center>
|
||||
<Section horizontalSpacing>
|
||||
<Typography variant="h1" as="h1">
|
||||
{t("errors.error")} 500 - {t("errors.server-error")}
|
||||
</Typography>
|
||||
|
||||
<Typography variant="text1" as="p" className="mt-4">
|
||||
<Button onClick={reset}>{t("errors.try-again")}</Button>
|
||||
</Typography>
|
||||
</Section>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user