From 964bd059c3576f469eb5bdeba2c32e4837effeef Mon Sep 17 00:00:00 2001 From: Nulo Date: Mon, 28 Aug 2023 10:46:21 -0300 Subject: [PATCH] dejar index en historial al cargar automaticmaente pagina --- src/lib/router.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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)); } } }