Commit b8d4d532 authored by hyeryung's avatar hyeryung

add check login

parent b578a681
Pipeline #20751 passed with stages
in 1 minute and 48 seconds
// eslint-disable-next-line no-undef
fetch('/web/dms/api/auth/status')
.then((response) => {
if (response.url === 'https://swlab.bwg.co.kr/web/dms/login') {
/* eslint-disable no-undef */
function removeSecretNav () {
const elements = document.getElementsByClassName('secret-nav')
while (elements.length > 0) {
elements[0].parentNode.removeChild(elements[0])
}
}
fetch('/web/dms/api/auth/status')
.then((response) => {
if (response.url === 'https://swlab.bwg.co.kr/web/dms/login') {
removeSecretNav()
}
})
.catch((error) => {
console.error('Error checking login status:', error)
removeSecretNav()
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment