Spaces:
Running
Running
import { useLocation } from "react-router-dom"; | |
import { useEffect } from "react"; | |
import { FileQuestion } from "lucide-react"; | |
import { Button } from "@/components/ui/button"; | |
import { Link } from "react-router-dom"; | |
const NotFound = () => { | |
const location = useLocation(); | |
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 max-w-md px-4"> | |
<div className="w-24 h-24 bg-muted rounded-full flex items-center justify-center mx-auto mb-6"> | |
<FileQuestion className="h-12 w-12 text-muted-foreground" /> | |
</div> | |
<h1 className="text-4xl font-bold mb-4 text-financial-navy dark:text-white">404</h1> | |
<p className="text-xl text-muted-foreground mb-8"> | |
The page you are looking for could not be found. | |
</p> | |
<div className="space-x-4"> | |
<Button asChild> | |
<Link to="/">Return to Home</Link> | |
</Button> | |
</div> | |
</div> | |
</div> | |
); | |
}; | |
export default NotFound; | |