-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #586 from NoroffFEU/Vt-logoPlacing
Vt logo and icons placing
- Loading branch information
Showing
8 changed files
with
142 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { logout } from '../../api/auth/index.js'; | ||
|
||
// The element id is temporary. need to replace it with the right one. | ||
|
||
// document.quaryselector('[data-auth=logout]').addEventListener('click', logout); | ||
const logoutButton = document.querySelector('#signOut'); | ||
console.log(logoutButton); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
import { getToken } from '../../api/getToken.js'; | ||
|
||
const checkLoginStatus = function () { | ||
const loggedIn = document.querySelectorAll(`data-visible="loggedIn"`); | ||
const loggedOut = document.querySelectorAll(`data-visible="loggedOut"`); | ||
|
||
export const checkLoginStatus = function () { | ||
const loggedIn = document.querySelector(`data-visible="loggedIn"`); | ||
const loggedOut = document.querySelector(`data-visible="loggedOut"`); | ||
console.log(loggedOut); | ||
const token = getToken(); | ||
|
||
if (token) { | ||
loggedOut.forEach((item) => item.classList.add('d-none')); | ||
loggedOut.forEach((item) => item.classList.add('d-block')); | ||
} else { | ||
loggedIn.forEach((item) => item.classList.add('d-none')); | ||
loggedIn.forEach((item) => item.classList.add('d-block')); | ||
} | ||
}; | ||
|
||
checkLoginStatus(); |