champs url dans les icones de la map et suppr du data attribute nid sur les liens

This commit is contained in:
Valentin
2024-11-13 11:42:30 +01:00
parent c82fc633aa
commit f2680fc65a
5 changed files with 33 additions and 40 deletions

View File

@@ -4,11 +4,11 @@ import { useLayoutStore } from '../stores/layout';
export async function initFirstLoadRouting(store, router, baseUrl, siteName) {
const decoupled_origin = JSON.parse(window.localStorage.getItem('decoupled_origin'));
if(decoupled_origin) {
if(decoupled_origin) {
await store.fetchContentData(baseUrl + decoupled_origin.url);
router.push(decoupled_origin.url);
window.localStorage.removeItem("decoupled_origin");
document.title = store.pageTitle;
document.title = store.pageTitle;
setActiveNavItem(store.contentType, decoupled_origin.url);
} else {
document.title = siteName;
@@ -29,7 +29,7 @@ export function handleClickableElements(clickableElements, store, router, baseUr
mapStore.resetMap();
} else {
await store.fetchContentData(baseUrl + href);
document.title = store.pageTitle;
document.title = store.pageTitle;
}
setActiveNavItem(store.contentType, href);
@@ -38,4 +38,4 @@ export function handleClickableElements(clickableElements, store, router, baseUr
}
}
}
}
}