From 7f7c8e8acbc707073155dd606711a750f0b00438 Mon Sep 17 00:00:00 2001 From: rajun Date: Tue, 27 Oct 2026 16:28:59 +0530 Subject: [PATCH] feat: add admin layout routes for projects, assets and settings --- app/routes.ts | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/routes.ts b/app/routes.ts index 6d73930..211288b 100644 --- a/app/routes.ts +++ b/app/routes.ts @@ -1,11 +1,17 @@ -import { type RouteConfig, index, route } from '@react-router/dev/routes'; +import { type RouteConfig, index, layout, route } from '@react-router/dev/routes'; export default [ - index('routes/admin/dashboard.tsx'), - route('login', 'routes/admin/login.tsx'), - route('preview/:id', 'routes/admin/asset-preview.tsx'), - - route('ar/:id', 'routes/ar/ar-viewer.tsx'), - + layout('routes/admin/layout.tsx', [ + index('routes/admin/index.tsx'), + route('projects', 'routes/admin/projects/index.tsx'), + route('projects/:id', 'routes/admin/projects/$id.tsx'), + route('assets', 'routes/admin/assets/index.tsx'), + route('assets/:id', 'routes/admin/assets/$id.tsx'), + route('settings', 'routes/admin/settings.tsx'), + // Older links + route('preview/:id', 'routes/admin/preview.$id.tsx'), + ]), + route('login', 'routes/login.tsx'), + route('ar/:id', 'routes/ar.$id.tsx'), route('*', 'routes/not-found.tsx'), ] satisfies RouteConfig;