Try to fix loginRedirect
This commit is contained in:
parent
8443d1da2d
commit
906d51b454
@ -1,7 +1,7 @@
|
|||||||
if (window.location.hostname !== "127.0.0.1" && window.location.hostname !== "localhost") {
|
if (window.location.hostname !== "127.0.0.1" && window.location.hostname !== "localhost") {
|
||||||
const redirectIfOnLogin = () => {
|
const redirectIfOnLogin = () => {
|
||||||
const path = window.location.pathname;
|
const path = window.location.pathname;
|
||||||
if (path == "/login" || path == "/register" || !window.localStorage.getItem("token")) {
|
if (path == "/login" || path == "/register" /* || !window.localStorage.getItem("token") */) {
|
||||||
window.location.pathname = "/login";
|
window.location.pathname = "/login";
|
||||||
//window.location.reload();
|
//window.location.reload();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user