From e56a9f34f07e8eddf5665edce3ff2eb0adb51bf1 Mon Sep 17 00:00:00 2001 From: VividTruthKeeper Date: Thu, 22 Sep 2022 21:35:31 +0500 Subject: [PATCH] imperative routing fixed --- src/App.tsx | 2 +- src/components/Nav.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index fbb3a9e..abd8020 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -67,7 +67,7 @@ const App = () => { // localStorage.removeItem("lastLocation"); navigate("/login"); } else { - navigate(localStorage.getItem("lastLocation") || "/dashboard"); + navigate(localStorage.getItem("lastLocation") || "/posts"); } }, [user]); diff --git a/src/components/Nav.tsx b/src/components/Nav.tsx index b5a4b44..703c9ce 100644 --- a/src/components/Nav.tsx +++ b/src/components/Nav.tsx @@ -26,7 +26,7 @@ const Nav = ({ aside, setAside }: Props) => {
{ localStorage.setItem("lastLocation", "/dashboard");