mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { useSeoMeta } from "@unhead/react";
|
|
import { useLocation } from "react-router-dom";
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useEffect } from "react";
|
|
|
|
const NotFound = () => {
|
|
const { t } = useTranslation();
|
|
const location = useLocation();
|
|
|
|
useSeoMeta({
|
|
title: "404 - Page Not Found",
|
|
description: "The page you are looking for could not be found. Return to the home page to continue browsing.",
|
|
});
|
|
|
|
useEffect(() => {
|
|
console.error(
|
|
"404 Error: User attempted to access non-existent route:",
|
|
location.pathname
|
|
);
|
|
}, [location.pathname]);
|
|
|
|
return (
|
|
<div className="min-h-screen flex items-center justify-center bg-background">
|
|
<div className="text-center">
|
|
<h1 className="text-4xl font-bold mb-4 text-foreground">404</h1>
|
|
<p className="text-xl text-muted-foreground mb-4">{t('pageNotFound')}</p>
|
|
<a href="/" className="text-primary hover:text-primary/80 underline">
|
|
{t('returnToHome')}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default NotFound;
|