retour à l'index en cliquant sur la carte depuis une étape

This commit is contained in:
2025-03-03 22:42:55 +01:00
parent 6ecf055060
commit dffd179bc9
6 changed files with 34 additions and 42 deletions

View File

@@ -23,11 +23,9 @@ export function handleClickableElements(clickableElements, store, router, baseUr
if (href.startsWith(baseUrl)) href = href.replace(baseUrl, '');
link.onclick = async function (e) {
console.log('click on link, route push');
router.push(href);
if (href !== window.location.pathname) {
pageChange(href, store, siteName, mapStore, baseUrl);
router.push(href);
pageChange(href, store, siteName, mapStore, baseUrl);
}
}
}
@@ -40,7 +38,6 @@ export async function handleBrowserNavigation(store, baseUrl, siteName, mapStore
}
export async function pageChange(href, store, siteName, mapStore, baseUrl) {
console.log('trigger page change');
if (href === '/') {
store.resetStore(true);
document.title = siteName;