Skip to content
Snippets Groups Projects
Commit 23c480f2 authored by Benoit Alessandroni's avatar Benoit Alessandroni
Browse files

Fixing the routing when coming from a share link

parent cd0e074c
No related branches found
No related tags found
2 merge requests!137Fix router bug,!125Fixing the routing when coming from a share link
Pipeline #3861 passed with stage
in 5 minutes and 3 seconds
......@@ -57,13 +57,25 @@ script(type='module').
loader.removeAttribute('hidden');
let user = await sibAuth.getUser();
let idToken = await sibAuth.getUserIdToken();
if ( !user ) {
console.log(window.location);
if ( !user && window.location.href.indexOf('public-dashboard/public-resource-detail') === -1) {
console.log("We have no user and not in public")
loader.setAttribute("hidden", true);
window.dispatchEvent(
new CustomEvent('requestNavigation', { detail: { route: 'splash' } })
);
}
if(!user && window.location.href.indexOf('public-dashboard/public-resource-detail') > -1) {
console.log("We are targetting the public space !")
//- window.dispatchEvent(
//- new CustomEvent('requestNavigation', { detail: {
//- route: 'public-resource-detail'
//- } })
//- );
loader.setAttribute("hidden", true);
}
user = await store.get(user);
if (user && user.mentor_profile) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment