Skip to content

Commit

Permalink
proper redirect after pw on subpath
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadim Ritter committed Sep 30, 2024
1 parent c955a63 commit 97db3f8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion client/src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,17 @@ export const useAuthStore = defineStore("auth", () => {
if(useAuthStore().redirectRoute == ""){
navigateTo(constants.RUNNING_EXAMS_ROUTE);
}else{
navigateTo(useAuthStore().redirectRoute);
let route: string = useAuthStore().redirectRoute;
let subPath: string | null = import.meta.env.VITE_SUB_PATH;

console.log("route: " + route);
console.log("subPath: " + subPath)

if(subPath != null && route.includes(subPath)){
route = route.replace(subPath, "");
}

navigateTo(route);
}
}

Expand Down

0 comments on commit 97db3f8

Please sign in to comment.