From 4b2b3df87c60687391d000de5582965fc311e6b0 Mon Sep 17 00:00:00 2001 From: pure-js <3690368+pure-js@users.noreply.github.com> Date: Tue, 26 Sep 2023 13:16:05 +0400 Subject: [PATCH] fix: 404 page --- src/index.jsx | 8 ++++---- src/pages/[all].tsx | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/index.jsx b/src/index.jsx index fb751935..7a94b553 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -51,12 +51,12 @@ const router = createBrowserRouter( }, ], }, - { - path: '*', - element: , - }, ], }, + { + path: '*', + element: , + }, ], { basename: import.meta.env.BASE_URL, diff --git a/src/pages/[all].tsx b/src/pages/[all].tsx index ced31f7a..d3ea1639 100644 --- a/src/pages/[all].tsx +++ b/src/pages/[all].tsx @@ -1,7 +1,14 @@ +import { + useLocation +} from "react-router-dom"; + function NoMatch() { + const location = useLocation(); + return (

404

+

No match for {location.pathname}

); }