fix: fix acces for logged out visitors

This commit is contained in:
2025-05-19 04:54:06 +02:00
parent ace54fb4ef
commit 07702b93b1
6 changed files with 62 additions and 46 deletions

View File

@@ -52,14 +52,16 @@ function modifyEvent() {
document.addEventListener("DOMContentLoaded", () => __awaiter(void 0, void 0, void 0, function* () {
var container = document.getElementById("mainContainer");
const saveBtn = document.getElementById("saveBtn");
var user = yield getMyAccount();
if (user) {
if (user.isOrganisation) {
unhideElementById(document, "mainContainer");
try {
var user = yield getMyAccount();
if (user) {
if (user.isOrganisation) {
unhideElementById(document, "mainContainer");
}
unhideElementById(document, "logout-btn");
}
unhideElementById(document, "logout-btn");
}
else {
catch (_a) {
unhideElementById(document, "joinnow-btn");
unhideElementById(document, "signin-btn");
}