feat: implement AppLayoutGuard for onboarding redirection

This commit is contained in:
Jose Selesan
2026-09-17 18:41:28 -03:00
parent 6100c998be
commit e8bca3a5ae
2 changed files with 37 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
import { createRootRoute, createRoute, createRouter, Outlet } from '@tanstack/react-router'
import { RootLayout } from './components/layout'
import { AppLayoutGuard } from './components/layout/AppLayoutGuard'
import { HomeView } from './routes/home'
import { GroupsView } from './routes/groups'
import { PaymentsView } from './routes/payments'
@@ -41,10 +41,11 @@ const onboardingRoute = createRoute({
})
// Capa con la navegación de la app autenticada (Sidebar + BottomNav).
// El guard redirige a /onboarding a quien no completó el onboarding.
const appLayoutRoute = createRoute({
getParentRoute: () => rootRoute,
id: 'app',
component: RootLayout,
component: AppLayoutGuard,
})
const indexRoute = createRoute({