This repository has been archived on 2024-04-05. You can view files and clone it, but cannot push or open issues/pull-requests.
score-tracker/public/scripts/main.js

21 lines
548 B
JavaScript
Raw Permalink Normal View History

2021-11-26 19:37:09 +00:00
const logInButton = document.getElementById('login-button');
const logOutButton = document.getElementById('logout-button');
2021-11-26 19:46:16 +00:00
const homeButton = document.getElementById('home-button');
2021-11-26 19:37:09 +00:00
if(logInButton) {
logInButton.addEventListener('click', () => {
window.location.href = "/auth/login";
});
}
if(logOutButton) {
logOutButton.addEventListener('click', () => {
window.location.href = "/auth/logout";
});
2021-11-26 19:46:16 +00:00
}
if(homeButton) {
homeButton.addEventListener('click', () => {
window.location.href = '/';
});
2021-11-26 19:37:09 +00:00
}