logout/login from anywhere

This commit is contained in:
Oliver Bryan
2025-12-22 06:36:14 +00:00
parent e550b936e0
commit bba672a020
3 changed files with 4 additions and 2 deletions

View File

@@ -69,7 +69,7 @@ export default function LogInForm() {
const data = await res.json();
localStorage.setItem("token", data.token);
localStorage.setItem("user", data.user);
window.location.href = "/";
window.location.href = "";
}
// unauthorized
else if (res.status === 401) {