Skip to content

Commit

Permalink
- Fix routing
Browse files Browse the repository at this point in the history
  • Loading branch information
hardiesoft committed Oct 15, 2024
1 parent 677bbcc commit 3f7c7f1
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion browse-next/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,19 @@ router.beforeEach(async (to, from, next) => {
projectName: urlNormalisedCurrentProjectName.value,
},
});
} else {
} else if (
to.name &&
![
"confirm-email",
"accept-project-invite",
"confirm-project-membership-request",
"user-settings",
"setup",
"end-user-agreement",
"register",
"register-with-token",
].includes(to.name as string)
) {
// Unknown project name, redirect to dashboard of first project match
if (UserProjects.value && UserProjects.value.length) {
return next({
Expand All @@ -696,6 +708,17 @@ router.beforeEach(async (to, from, next) => {
}
}
}
// else {
// if (to.matched.length === 1 && to.matched[0].name === "dashboard") {
// // Group in url not found, redirect to our last selected group.
// return next({
// name: "dashboard",
// params: {
// projectName: urlNormalisedCurrentProjectName.value,
// },
// });
// }
// }
}
}

Expand Down

0 comments on commit 3f7c7f1

Please sign in to comment.