fix code navigation
This commit is contained in:
parent
31b577cc8b
commit
9370996c03
|
@ -23,18 +23,7 @@ export function handleClickableElements(clickableElements, store, router, baseUr
|
||||||
link.onclick = async function (e) {
|
link.onclick = async function (e) {
|
||||||
router.push(href);
|
router.push(href);
|
||||||
if (href !== window.location.pathname) {
|
if (href !== window.location.pathname) {
|
||||||
if (href === '/') {
|
pageChange(href, store, siteName, mapStore, baseUrl);
|
||||||
store.resetStore(true);
|
|
||||||
document.title = siteName;
|
|
||||||
mapStore.resetMap();
|
|
||||||
} else {
|
|
||||||
await store.fetchContentData(baseUrl + href);
|
|
||||||
document.title = store.pageTitle;
|
|
||||||
}
|
|
||||||
setActiveNavItem(store.contentType, href);
|
|
||||||
|
|
||||||
const listeEtape = document.querySelector('#etapes-liste');
|
|
||||||
if (!useLayoutStore().isDesktop) useLayoutStore().collapseEtapeListe(listeEtape);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue