imperative routing fixed

This commit is contained in:
VividTruthKeeper 2022-09-22 21:35:31 +05:00
parent c9be87cbb0
commit e56a9f34f0
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ const App = () => {
// localStorage.removeItem("lastLocation");
navigate("/login");
} else {
navigate(localStorage.getItem("lastLocation") || "/dashboard");
navigate(localStorage.getItem("lastLocation") || "/posts");
}
}, [user]);

View File

@ -26,7 +26,7 @@ const Nav = ({ aside, setAside }: Props) => {
<div className="nav inner">
<div className="nav__left">
<Link
to={"/dashboard"}
to={"/posts"}
className="nav__img"
onClick={() => {
localStorage.setItem("lastLocation", "/dashboard");