imperative routing fixed
This commit is contained in:
parent
c9be87cbb0
commit
e56a9f34f0
|
|
@ -67,7 +67,7 @@ const App = () => {
|
|||
// localStorage.removeItem("lastLocation");
|
||||
navigate("/login");
|
||||
} else {
|
||||
navigate(localStorage.getItem("lastLocation") || "/dashboard");
|
||||
navigate(localStorage.getItem("lastLocation") || "/posts");
|
||||
}
|
||||
}, [user]);
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue