diff --git a/apps/preview/app/src/routes.tsx b/apps/preview/app/src/routes.tsx index 8a1afa85..7014f7a1 100644 --- a/apps/preview/app/src/routes.tsx +++ b/apps/preview/app/src/routes.tsx @@ -40,18 +40,23 @@ const getRoutes = (templates: TemplateData[]) => { export const getRouter = (templates: Record) => { const { routes, templateParts } = getRoutes(Object.values(templates)); - const router = createBrowserRouter([ + const router = createBrowserRouter( + [ + { + element: ( + + + + ), + errorElement: , + path: '/' + }, + ...routes + ], { - element: ( - - - - ), - errorElement: , - path: import.meta.env.VITE_JSXEMAIL_BASE_PATH || '/' - }, - ...routes - ]); + basename: import.meta.env.VITE_JSXEMAIL_BASE_PATH + } + ); return router; };