|
@@ -2,7 +2,7 @@ import loginPage from "./login/index.js";
|
|
|
import dashboardPage from "./dashboard/index.js";
|
|
import dashboardPage from "./dashboard/index.js";
|
|
|
import adminCreatePage from "./adminCreate/index.js";
|
|
import adminCreatePage from "./adminCreate/index.js";
|
|
|
|
|
|
|
|
-window.adminExists = true;
|
|
|
|
|
|
|
+window.adminExists = "true";
|
|
|
|
|
|
|
|
let pages = document.querySelectorAll(".page");
|
|
let pages = document.querySelectorAll(".page");
|
|
|
|
|
|
|
@@ -22,7 +22,7 @@ let openPage = (page)=>{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//Check for login
|
|
//Check for login
|
|
|
-if(!window.adminExists){
|
|
|
|
|
|
|
+if(window.adminExists !== "true"){
|
|
|
adminCreatePage.display();
|
|
adminCreatePage.display();
|
|
|
}else if(localStorage.getItem("loggedIn") === "true"){
|
|
}else if(localStorage.getItem("loggedIn") === "true"){
|
|
|
dashboardPage.display();
|
|
dashboardPage.display();
|