35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { useSeoMeta } from "@unhead/react";
|
|
import { Link, useLocation } from "react-router-dom";
|
|
import { useEffect } from "react";
|
|
import { useTranslation } from '@/contexts/language';
|
|
|
|
const NotFound = () => {
|
|
const location = useLocation();
|
|
const { t } = useTranslation();
|
|
|
|
useSeoMeta({
|
|
title: t('settingsUi.notFound.seoTitle'),
|
|
description: t('settingsUi.notFound.seoDescription'),
|
|
});
|
|
|
|
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-gray-100 dark:bg-gray-900">
|
|
<div className="text-center">
|
|
<h1 className="text-4xl font-bold mb-4 text-gray-900 dark:text-gray-100">404</h1>
|
|
<p className="text-xl text-gray-600 dark:text-gray-400 mb-4">{t('settingsUi.notFound.message')}</p>
|
|
<Link to="/" className="text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300 underline">
|
|
{t('settingsUi.notFound.returnHome')}
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default NotFound;
|