diff --git a/src/assets/react.svg b/src/assets/react.svg deleted file mode 100644 index 6c87de9..0000000 --- a/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts index 5496c20..597c851 100644 --- a/src/routeTree.gen.ts +++ b/src/routeTree.gen.ts @@ -11,14 +11,19 @@ // Import Routes import { Route as rootRoute } from './routes/__root' +import { Route as RecipesImport } from './routes/recipes' import { Route as LoginImport } from './routes/login' import { Route as AuthImport } from './routes/_auth' import { Route as AuthIndexImport } from './routes/_auth/index' -import { Route as AuthRecipesImport } from './routes/_auth/recipes' -import { Route as AuthRecipesUsernameSlugImport } from './routes/_auth/recipes_/$username.$slug' +import { Route as RecipesUsernameSlugImport } from './routes/recipes_/$username.$slug' // Create/Update Routes +const RecipesRoute = RecipesImport.update({ + path: '/recipes', + getParentRoute: () => rootRoute, +} as any) + const LoginRoute = LoginImport.update({ path: '/login', getParentRoute: () => rootRoute, @@ -34,14 +39,9 @@ const AuthIndexRoute = AuthIndexImport.update({ getParentRoute: () => AuthRoute, } as any) -const AuthRecipesRoute = AuthRecipesImport.update({ - path: '/recipes', - getParentRoute: () => AuthRoute, -} as any) - -const AuthRecipesUsernameSlugRoute = AuthRecipesUsernameSlugImport.update({ +const RecipesUsernameSlugRoute = RecipesUsernameSlugImport.update({ path: '/recipes/$username/$slug', - getParentRoute: () => AuthRoute, + getParentRoute: () => rootRoute, } as any) // Populate the FileRoutesByPath interface @@ -62,12 +62,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LoginImport parentRoute: typeof rootRoute } - '/_auth/recipes': { - id: '/_auth/recipes' + '/recipes': { + id: '/recipes' path: '/recipes' fullPath: '/recipes' - preLoaderRoute: typeof AuthRecipesImport - parentRoute: typeof AuthImport + preLoaderRoute: typeof RecipesImport + parentRoute: typeof rootRoute } '/_auth/': { id: '/_auth/' @@ -76,12 +76,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthIndexImport parentRoute: typeof AuthImport } - '/_auth/recipes/$username/$slug': { - id: '/_auth/recipes/$username/$slug' + '/recipes/$username/$slug': { + id: '/recipes/$username/$slug' path: '/recipes/$username/$slug' fullPath: '/recipes/$username/$slug' - preLoaderRoute: typeof AuthRecipesUsernameSlugImport - parentRoute: typeof AuthImport + preLoaderRoute: typeof RecipesUsernameSlugImport + parentRoute: typeof rootRoute } } } @@ -89,12 +89,10 @@ declare module '@tanstack/react-router' { // Create and export the route tree export const routeTree = rootRoute.addChildren({ - AuthRoute: AuthRoute.addChildren({ - AuthRecipesRoute, - AuthIndexRoute, - AuthRecipesUsernameSlugRoute, - }), + AuthRoute: AuthRoute.addChildren({ AuthIndexRoute }), LoginRoute, + RecipesRoute, + RecipesUsernameSlugRoute, }) /* prettier-ignore-end */ @@ -106,31 +104,29 @@ export const routeTree = rootRoute.addChildren({ "filePath": "__root.tsx", "children": [ "/_auth", - "/login" + "/login", + "/recipes", + "/recipes/$username/$slug" ] }, "/_auth": { "filePath": "_auth.tsx", "children": [ - "/_auth/recipes", - "/_auth/", - "/_auth/recipes/$username/$slug" + "/_auth/" ] }, "/login": { "filePath": "login.tsx" }, - "/_auth/recipes": { - "filePath": "_auth/recipes.tsx", - "parent": "/_auth" + "/recipes": { + "filePath": "recipes.tsx" }, "/_auth/": { "filePath": "_auth/index.tsx", "parent": "/_auth" }, - "/_auth/recipes/$username/$slug": { - "filePath": "_auth/recipes_/$username.$slug.tsx", - "parent": "/_auth" + "/recipes/$username/$slug": { + "filePath": "recipes_/$username.$slug.tsx" } } }