diff --git a/src/lib/router.ts b/src/lib/router.ts index 52d912b..5bfe4e3 100644 --- a/src/lib/router.ts +++ b/src/lib/router.ts @@ -20,29 +20,29 @@ export const currentRoute = writable<{ }>({ component: ChooseWorld }); export let router = navaid("/", () => - currentRoute.set({ component: NotFound }) + currentRoute.set({ component: NotFound }), ); router.on(routes.ChooseWorld, () => - currentRoute.set({ component: ChooseWorld }) + currentRoute.set({ component: ChooseWorld }), ); router.on(routes.CreateWorld, () => - currentRoute.set({ component: CreateWorld }) + currentRoute.set({ component: CreateWorld }), ); router.on(routes.ShareWorld, (params) => - currentRoute.set({ component: ShareWorld, params }) + currentRoute.set({ component: ShareWorld, params }), ); router.on(routes.JoinWorld, (params) => - currentRoute.set({ component: JoinWorld, params }) + currentRoute.set({ component: JoinWorld, params }), ); router.on(routes.Page, (params) => - currentRoute.set({ component: Page, params }) + currentRoute.set({ component: Page, params }), ); async function setRouteToLastPage() { if (location.pathname === "/") { const lastPage = await lastPageStore.get(); if (lastPage) { - router.route(inject(routes.Page, lastPage), true); + router.route(inject(routes.Page, lastPage)); } } }