checks user sign in before allowing buying/bidding

This commit is contained in:
John Piaszynski
2023-09-23 15:35:17 -05:00
parent 3faea4541b
commit 9a16aa7478
5 changed files with 43 additions and 11 deletions

View File

@ -0,0 +1,15 @@
let USER_SIGNED_IN = false;
function check_sign_in(game) {
const is_user_signed_in = localStorage.getItem("USER_SIGNED_IN");
if (is_user_signed_in !== null && is_user_signed_in === 'true') {
window.location.href = "./buy.html?game=" + game;
} else {
window.location.href = "./signin.html";
}
}
function set_user_signed_in() {
localStorage.setItem('USER_SIGNED_IN', true);
}