From b74144ab05e330d96b074a9270ccc66a40b60265 Mon Sep 17 00:00:00 2001 From: Dennis Chen <41879777+chennisden@users.noreply.github.com> Date: Wed, 12 Jun 2024 15:13:31 -0700 Subject: [PATCH] Make it so 404 doesn't rewrite the URL (#111) Confusing the user so that they don't know what URL they originally were trying to visit is very unfriendly behavior. --- frontend/src/components/NotFoundRedirect.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/NotFoundRedirect.tsx b/frontend/src/components/NotFoundRedirect.tsx index 4b48929f..c4768aaa 100644 --- a/frontend/src/components/NotFoundRedirect.tsx +++ b/frontend/src/components/NotFoundRedirect.tsx @@ -1,12 +1,7 @@ -import { useEffect } from "react"; -import { useNavigate } from "react-router-dom"; +import NotFound from "pages/NotFound"; const NotFoundRedirect = () => { - const navigate = useNavigate(); - useEffect(() => { - navigate("/404", { replace: true }); - }, [navigate]); - return null; + return ; }; export default NotFoundRedirect;