2024-08-21 19:39:59 +00:00
|
|
|
// let loginLink = document.getElementById("login-link");
|
|
|
|
// let vtLink = document.getElementById("vt-link");
|
|
|
|
//
|
|
|
|
// document.addEventListener("DOMContentLoaded", function () {
|
|
|
|
// if (localStorage.getItem("token") !== null) {
|
|
|
|
// loginLink.innerHTML = '<a href="#!" onclick="logout()" class="nav-link">Logout</a>';
|
|
|
|
// vtLink.classList.remove('d-none');
|
|
|
|
// } else {
|
|
|
|
// loginLink.innerHTML = '<a href="/login" class="nav-link">Login</a>';
|
|
|
|
// }
|
|
|
|
// loginLink.classList.remove('d-none')
|
|
|
|
// });
|
2024-08-19 19:17:51 +00:00
|
|
|
|
2024-08-21 19:39:59 +00:00
|
|
|
// function logout() {
|
|
|
|
// localStorage.removeItem("token");
|
|
|
|
// localStorage.removeItem("token_expiry");
|
|
|
|
// location.href = "/logout";
|
|
|
|
// }
|
2024-08-19 19:17:51 +00:00
|
|
|
|