Skip to content

Commit

Permalink
redirection fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ManWithACap committed Jun 1, 2024
1 parent 70271eb commit eeec451
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pages/scripts/dashboard.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if (!sessionStorage.getItem("username")) {
window.location.href = "../../";
window.location.href = localStorage.getItem("loginPage");
}

window.onload = function() {
Expand Down
2 changes: 2 additions & 0 deletions scripts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const dashboardURL = "pages/dashboard.html";

window.localStorage.setItem("loginPage", window.location.href);

document.getElementById('loginForm').addEventListener('submit', async function(event) {
event.preventDefault();

Expand Down

0 comments on commit eeec451

Please sign in to comment.