diff --git a/src/includes/entrepreneur/resources/detail.pug b/src/includes/entrepreneur/resources/detail.pug index 3efe7304ee9ac6281c504c5ca4c8e9ee347561d1..909cb8f81ee7b07aa925485a001eea128a73041d 100644 --- a/src/includes/entrepreneur/resources/detail.pug +++ b/src/includes/entrepreneur/resources/detail.pug @@ -1,5 +1,5 @@ .block_log.block_creat_count.no_shadow - sib-link(class="backlink", next="entrepreneur-resource-list") + sib-link(class="backlink", next="entrepreneur-dashboard") .like p.backlink i.fas.fa-times diff --git a/src/scripts/dispatch-space-n-user.js b/src/scripts/dispatch-space-n-user.js index a438122f7797129ef7c8994c4daa5a689734eede..e56c474e433d123ea68e275a8ce215add3585876 100644 --- a/src/scripts/dispatch-space-n-user.js +++ b/src/scripts/dispatch-space-n-user.js @@ -78,12 +78,13 @@ class CoopStarterLoginComponent extends HTMLElement { //If the url is different after the treatment, we reload with the good url if(newUrl !== window.location.href){ - var newRoute = new URL(newUrl).pathname.replace(/^\/([a-z]{2})\//, "") - + console.log(newUrl); + var newRoute = new URL(newUrl).pathname.replace(/^\/([a-z]{2})\//, ""); + console.log(newRoute.split(/\/(.*?)\//)[1]); window.dispatchEvent( new CustomEvent('requestNavigation', { detail: { - route: 'entrepreneur-resource-detail', + route: newRoute.split(/\/(.*?)\//)[1], resource: { "@id": this.decodeId(newRoute.split(/@(.+)/)[1]) } } })