diff --git a/src/index.pug b/src/index.pug index 367c3ca47e8390dda97a8fa6cc9b6dddfa2fe10a..62d99ece51fc3e1cb3402d39b6e372894a2540ea 100644 --- a/src/index.pug +++ b/src/index.pug @@ -18,6 +18,9 @@ html #entrepreneur-dashboard(hidden).no-sidebar include includes/entrepreneur/dashboard.pug + #public-dashboard(hidden).no-sidebar + include includes/public/dashboard.pug + #splash(hidden).no-sidebar.container.flex include includes/splash.pug diff --git a/src/scripts/dispatch-space-n-user.js b/src/scripts/dispatch-space-n-user.js index b4dc198100d9386a789161a9d357123ea7167ad1..58d115b2016725faa95daf70cd41329f297326b1 100644 --- a/src/scripts/dispatch-space-n-user.js +++ b/src/scripts/dispatch-space-n-user.js @@ -77,10 +77,8 @@ class CoopStarterLoginComponent extends HTMLElement { var newUrl = window.location.href.replace(/\/([a-z]+)-dashboard\/([a-z]+)-resource-detail/, `/${userPrefix}-dashboard/${userPrefix}-resource-detail`) //If the url is different after the treatment, we reload with the good url - if(newUrl !== window.location.href){ - console.log(newUrl); + if (newUrl !== window.location.href) { var newRoute = new URL(newUrl).pathname.replace(/^\/([a-z]{2})\//, ""); - console.log(newRoute.split(/\/(.*?)\//)[1]); window.dispatchEvent( new CustomEvent('requestNavigation', { detail: { @@ -89,6 +87,8 @@ class CoopStarterLoginComponent extends HTMLElement { } }) ); + window.location.href = newUrl; + loader.toggleAttribute('hidden', true); } else { loader.toggleAttribute('hidden', true); }