1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 04:32:35 +01:00

Add token check back to loginRedirect

This commit is contained in:
Madeline 2022-10-31 12:18:30 +11:00
parent 1cacd4413a
commit ed92e2fa65

View File

@ -1,7 +1,7 @@
if (window.location.hostname !== "127.0.0.1" && window.location.hostname !== "localhost") {
const redirectIfOnLogin = () => {
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.reload();
}