feat(routing): pass the new url to pageChange event

This commit is contained in:
Maieul BOYER 2026-01-04 14:57:30 +01:00 committed by Maix0
parent 6f89e4a3e1
commit 9947970f63
2 changed files with 8 additions and 11 deletions

View file

@ -205,9 +205,10 @@ export async function handleRoute() {
`/login?returnTo=${encodeURIComponent(window.location.pathname)}`,
);
const app = document.getElementById("app")!;
document.dispatchEvent(
new CustomEvent("ft:pageChange" as any, {} as any) as any,
);
const event = new CustomEvent("ft:pageChange", { detail: window.location.pathname });
document.dispatchEvent(event);
let ret = await executeRouteHandler(
route_handler,
window.location.pathname,