feat: Logging in multiple users, user selection

This commit is contained in:
Aleksi Lassila
2024-06-12 23:10:48 +03:00
parent 5c1a4d4206
commit f5220e21e0
15 changed files with 226 additions and 88 deletions

View File

@@ -113,7 +113,14 @@ export function useStackRouter({
};
}
const navigate = (routeString: string, options: { replaceStack?: boolean } = {}) => {
const navigate = (
routeString: string,
options: { replaceStack?: boolean; refresh?: boolean } = {}
) => {
if (options.refresh) {
location.assign(routeString);
return;
}
const page: Page = routeStringToRoute(routeString);
const replaceStack = page.route.root || options.replaceStack || false;