mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 22:31:13 -05:00
Refactor code structure and remove redundant changes
This commit is contained in:
27
src-old/pages/NotFound.tsx
Normal file
27
src-old/pages/NotFound.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { useEffect } from "react";
|
||||
import { useDocumentTitle } from '@/hooks/useDocumentTitle';
|
||||
import { logger } from '@/lib/logger';
|
||||
|
||||
const NotFound = () => {
|
||||
useDocumentTitle('404 - Page Not Found');
|
||||
const location = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
logger.error("404 Error: User attempted to access non-existent route", { pathname: location.pathname });
|
||||
}, [location.pathname]);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center bg-gray-100">
|
||||
<div className="text-center">
|
||||
<h1 className="mb-4 text-4xl font-bold">404</h1>
|
||||
<p className="mb-4 text-xl text-gray-600">Oops! Page not found</p>
|
||||
<a href="/" className="text-blue-500 underline hover:text-blue-700">
|
||||
Return to Home
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default NotFound;
|
||||
Reference in New Issue
Block a user