fix(not-found):remove unused useEffect that polutted client logs

This commit is contained in:
sanjidarimi
2026-06-17 20:31:27 +06:00
parent 24544eb680
commit e1ed111c55
+4 -9
View File
@@ -1,18 +1,13 @@
import { Link, useLocation } from "react-router-dom"; import { Link } from "react-router-dom";
import { useEffect } from "react";
const NotFound = () => { const NotFound = () => {
const location = useLocation();
useEffect(() => {
console.error("404 Error: User attempted to access non-existent route:", location.pathname);
}, [location.pathname]);
return ( return (
<div className="flex min-h-screen items-center justify-center bg-muted"> <div className="flex min-h-screen items-center justify-center bg-muted">
<div className="text-center"> <div className="text-center">
<h1 className="mb-4 text-4xl font-bold">404</h1> <h1 className="mb-4 text-4xl font-bold">404</h1>
<p className="mb-4 text-xl text-muted-foreground">Oops! Page not found</p> <p className="mb-4 text-xl text-muted-foreground">
Oops! Page not found
</p>
<Link to="/" className="text-primary underline hover:text-primary/90"> <Link to="/" className="text-primary underline hover:text-primary/90">
Return to Home Return to Home
</Link> </Link>