From 5ba3afc39346e101b0fcdfb0323c5597ec8b8ae3 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sun, 25 Jan 2026 13:29:11 +0100 Subject: [PATCH] error pages --- app/[locale]/error.tsx | 42 ++++++++++++++++++++++++++++------ app/[locale]/not-found.tsx | 46 ++++++++++++++++++++++++++++++++++++++ messages/de.json | 9 +++++++- messages/en.json | 9 +++++++- 4 files changed, 97 insertions(+), 9 deletions(-) create mode 100644 app/[locale]/not-found.tsx diff --git a/app/[locale]/error.tsx b/app/[locale]/error.tsx index 93f9d82d..9fc662fa 100644 --- a/app/[locale]/error.tsx +++ b/app/[locale]/error.tsx @@ -3,7 +3,8 @@ import * as Sentry from '@sentry/nextjs'; import { useEffect } from 'react'; import { useTranslations } from 'next-intl'; -import { Container, Button } from '@/components/ui'; +import { Container, Button, Heading } from '@/components/ui'; +import Scribble from '@/components/Scribble'; export default function Error({ error, @@ -19,14 +20,41 @@ export default function Error({ }, [error]); return ( - -

{t('title')}

-

+ + {/* Industrial Background Element */} +

+ 500 +
+ +
+ + 500 + + +
+ + + {t('title')} + + +

{t('description')}

- + +
+ + +
+ + {/* Decorative Industrial Line */} +
); } diff --git a/app/[locale]/not-found.tsx b/app/[locale]/not-found.tsx new file mode 100644 index 00000000..ed0d56c9 --- /dev/null +++ b/app/[locale]/not-found.tsx @@ -0,0 +1,46 @@ +import { useTranslations } from 'next-intl'; +import { Container, Button, Heading } from '@/components/ui'; +import Scribble from '@/components/Scribble'; + +export default function NotFound() { + const t = useTranslations('Error.notFound'); + + return ( + + {/* Industrial Background Element */} +
+ 404 +
+ +
+ + 404 + + +
+ + + {t('title')} + + +

+ {t('description')} +

+ +
+ + +
+ + {/* Decorative Industrial Line */} +
+ + ); +} diff --git a/messages/de.json b/messages/de.json index e219e0e6..a78b7014 100644 --- a/messages/de.json +++ b/messages/de.json @@ -368,6 +368,13 @@ "Error": { "title": "Etwas ist schief gelaufen!", "description": "Wir sind auf einen unerwarteten Fehler gestoßen. Unser Team wurde benachrichtigt und arbeitet an einer Lösung.", - "tryAgain": "Erneut versuchen" + "tryAgain": "Erneut versuchen", + "goHome": "Zurück zur Startseite", + "notFound": { + "title": "Verbindung unterbrochen", + "subtitle": "404 - Seite nicht gefunden", + "description": "Es scheint, als wäre das Kabel zu dieser Seite unterbrochen worden. Wir konnten die gesuchte Ressource nicht finden.", + "cta": "Zurück zur Sicherheit" + } } } diff --git a/messages/en.json b/messages/en.json index 6995be9a..5d931a06 100644 --- a/messages/en.json +++ b/messages/en.json @@ -368,6 +368,13 @@ "Error": { "title": "Something went wrong!", "description": "We encountered an unexpected error. Our team has been notified and is working on a fix.", - "tryAgain": "Try again" + "tryAgain": "Try again", + "goHome": "Back to Home", + "notFound": { + "title": "Connection Lost", + "subtitle": "404 - Page Not Found", + "description": "It seems the cable to this page has been disconnected. We couldn't find the resource you were looking for.", + "cta": "Back to Safety" + } } }