Add redirection to project depending on rad-web cwd

This commit is contained in:
Sebastian Martinez
2024-02-07 11:47:08 +00:00
committed by Rūdolfs Ošiņš
parent 414c6cafda
commit 2b3b8bc0de
7 changed files with 28 additions and 11 deletions
+8 -1
View File
@@ -35,7 +35,14 @@
},
});
}
void router.push({ resource: "home" });
const route = router.urlToRoute(
new URL(activeRoute.params.path || "", window.location.origin),
);
if (route) {
void router.push(route);
} else {
void router.push({ resource: "home" });
}
});
</script>