diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts index 0a9e7b3..dd06ff5 100644 --- a/src/routeTree.gen.ts +++ b/src/routeTree.gen.ts @@ -14,6 +14,7 @@ import { Route as RedefinirSenhaRouteImport } from './routes/redefinir-senha' import { Route as RecuperarSenhaRouteImport } from './routes/recuperar-senha' import { Route as PainelRouteImport } from './routes/painel' import { Route as LoginRouteImport } from './routes/login' +import { Route as AdminRouteImport } from './routes/admin' import { Route as IndexRouteImport } from './routes/index' import { Route as PainelIndexRouteImport } from './routes/painel.index' import { Route as AdminIndexRouteImport } from './routes/admin.index' @@ -58,6 +59,11 @@ const LoginRoute = LoginRouteImport.update({ path: '/login', getParentRoute: () => rootRouteImport, } as any) +const AdminRoute = AdminRouteImport.update({ + id: '/admin', + path: '/admin', + getParentRoute: () => rootRouteImport, +} as any) const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', @@ -69,9 +75,9 @@ const PainelIndexRoute = PainelIndexRouteImport.update({ getParentRoute: () => PainelRoute, } as any) const AdminIndexRoute = AdminIndexRouteImport.update({ - id: '/admin/', - path: '/admin/', - getParentRoute: () => rootRouteImport, + id: '/', + path: '/', + getParentRoute: () => AdminRoute, } as any) const PainelSkillsRoute = PainelSkillsRouteImport.update({ id: '/skills', @@ -151,6 +157,7 @@ const AdminAgenteIdRoute = AdminAgenteIdRouteImport.update({ export interface FileRoutesByFullPath { '/': typeof IndexRoute + '/admin': typeof AdminRouteWithChildren '/login': typeof LoginRoute '/painel': typeof PainelRouteWithChildren '/recuperar-senha': typeof RecuperarSenhaRoute @@ -200,6 +207,7 @@ export interface FileRoutesByTo { export interface FileRoutesById { __root__: typeof rootRouteImport '/': typeof IndexRoute + '/admin': typeof AdminRouteWithChildren '/login': typeof LoginRoute '/painel': typeof PainelRouteWithChildren '/recuperar-senha': typeof RecuperarSenhaRoute @@ -227,6 +235,7 @@ export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath fullPaths: | '/' + | '/admin' | '/login' | '/painel' | '/recuperar-senha' @@ -275,6 +284,7 @@ export interface FileRouteTypes { id: | '__root__' | '/' + | '/admin' | '/login' | '/painel' | '/recuperar-senha' @@ -301,13 +311,13 @@ export interface FileRouteTypes { } export interface RootRouteChildren { IndexRoute: typeof IndexRoute + AdminRoute: typeof AdminRouteWithChildren LoginRoute: typeof LoginRoute PainelRoute: typeof PainelRouteWithChildren RecuperarSenhaRoute: typeof RecuperarSenhaRoute RedefinirSenhaRoute: typeof RedefinirSenhaRoute SignupRoute: typeof SignupRoute CheckoutSucessoRoute: typeof CheckoutSucessoRoute - AdminIndexRoute: typeof AdminIndexRoute } declare module '@tanstack/react-router' { @@ -347,6 +357,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LoginRouteImport parentRoute: typeof rootRouteImport } + '/admin': { + id: '/admin' + path: '/admin' + fullPath: '/admin' + preLoaderRoute: typeof AdminRouteImport + parentRoute: typeof rootRouteImport + } '/': { id: '/' path: '/' @@ -363,10 +380,10 @@ declare module '@tanstack/react-router' { } '/admin/': { id: '/admin/' - path: '/admin' + path: '/' fullPath: '/admin/' preLoaderRoute: typeof AdminIndexRouteImport - parentRoute: typeof rootRouteImport + parentRoute: typeof AdminRoute } '/painel/skills': { id: '/painel/skills' @@ -476,6 +493,18 @@ declare module '@tanstack/react-router' { } } +interface AdminRouteChildren { + AdminIndexRoute: typeof AdminIndexRoute + AdminAgenteIdRoute: typeof AdminAgenteIdRoute +} + +const AdminRouteChildren: AdminRouteChildren = { + AdminIndexRoute: AdminIndexRoute, + AdminAgenteIdRoute: AdminAgenteIdRoute, +} + +const AdminRouteWithChildren = AdminRoute._addFileChildren(AdminRouteChildren) + interface PainelSkillsRouteChildren { PainelSkillsIdRoute: typeof PainelSkillsIdRoute PainelSkillsNovaRoute: typeof PainelSkillsNovaRoute @@ -525,13 +554,13 @@ const PainelRouteWithChildren = const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, + AdminRoute: AdminRouteWithChildren, LoginRoute: LoginRoute, PainelRoute: PainelRouteWithChildren, RecuperarSenhaRoute: RecuperarSenhaRoute, RedefinirSenhaRoute: RedefinirSenhaRoute, SignupRoute: SignupRoute, CheckoutSucessoRoute: CheckoutSucessoRoute, - AdminIndexRoute: AdminIndexRoute, } export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) diff --git a/src/routes/admin.tsx b/src/routes/admin.tsx new file mode 100644 index 0000000..d816c36 --- /dev/null +++ b/src/routes/admin.tsx @@ -0,0 +1,11 @@ +"use client"; + +import { Outlet, createFileRoute } from "@tanstack/react-router"; + +export const Route = createFileRoute("/admin")({ + component: AdminLayout, +}); + +function AdminLayout() { + return ; +} \ No newline at end of file