fixed render bug
This commit is contained in:
@@ -103,6 +103,7 @@ export const Header = () => {
|
|||||||
Cookies.remove("token");
|
Cookies.remove("token");
|
||||||
setIsLoggedIn(false);
|
setIsLoggedIn(false);
|
||||||
setTriggerLogout(true);
|
setTriggerLogout(true);
|
||||||
|
navigate("/login", { replace: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export const LoginPage = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isLoggedIn) {
|
if (isLoggedIn) {
|
||||||
navigate("/", { replace: true });
|
navigate("/", { replace: true });
|
||||||
|
window.location.reload(); // Mit Tobais besprechen, ob das so bleiben soll
|
||||||
}
|
}
|
||||||
}, [isLoggedIn, navigate]);
|
}, [isLoggedIn, navigate]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user