alternative tangled frontend (extremely wip)

feat: repo routes

serenity cc79c8c5 011b3622

+64 -2
+46 -2
src/routeTree.gen.ts
··· 12 12 import { Route as LayoutRouteImport } from './routes/_layout' 13 13 import { Route as LayoutIndexRouteImport } from './routes/_layout/index' 14 14 import { Route as LayoutLoginRouteImport } from './routes/_layout/login' 15 + import { Route as LayoutIdentifierIndexRouteImport } from './routes/_layout/$identifier/index' 15 16 import { Route as LayoutOauthCallbackRouteImport } from './routes/_layout/oauth/callback' 17 + import { Route as LayoutIdentifierRepoIndexRouteImport } from './routes/_layout/$identifier/$repo/index' 16 18 17 19 const LayoutRoute = LayoutRouteImport.update({ 18 20 id: '/_layout', ··· 28 30 path: '/login', 29 31 getParentRoute: () => LayoutRoute, 30 32 } as any) 33 + const LayoutIdentifierIndexRoute = LayoutIdentifierIndexRouteImport.update({ 34 + id: '/$identifier/', 35 + path: '/$identifier/', 36 + getParentRoute: () => LayoutRoute, 37 + } as any) 31 38 const LayoutOauthCallbackRoute = LayoutOauthCallbackRouteImport.update({ 32 39 id: '/oauth/callback', 33 40 path: '/oauth/callback', 34 41 getParentRoute: () => LayoutRoute, 35 42 } as any) 43 + const LayoutIdentifierRepoIndexRoute = 44 + LayoutIdentifierRepoIndexRouteImport.update({ 45 + id: '/$identifier/$repo/', 46 + path: '/$identifier/$repo/', 47 + getParentRoute: () => LayoutRoute, 48 + } as any) 36 49 37 50 export interface FileRoutesByFullPath { 38 51 '/login': typeof LayoutLoginRoute 39 52 '/': typeof LayoutIndexRoute 40 53 '/oauth/callback': typeof LayoutOauthCallbackRoute 54 + '/$identifier': typeof LayoutIdentifierIndexRoute 55 + '/$identifier/$repo': typeof LayoutIdentifierRepoIndexRoute 41 56 } 42 57 export interface FileRoutesByTo { 43 58 '/login': typeof LayoutLoginRoute 44 59 '/': typeof LayoutIndexRoute 45 60 '/oauth/callback': typeof LayoutOauthCallbackRoute 61 + '/$identifier': typeof LayoutIdentifierIndexRoute 62 + '/$identifier/$repo': typeof LayoutIdentifierRepoIndexRoute 46 63 } 47 64 export interface FileRoutesById { 48 65 __root__: typeof rootRouteImport ··· 50 67 '/_layout/login': typeof LayoutLoginRoute 51 68 '/_layout/': typeof LayoutIndexRoute 52 69 '/_layout/oauth/callback': typeof LayoutOauthCallbackRoute 70 + '/_layout/$identifier/': typeof LayoutIdentifierIndexRoute 71 + '/_layout/$identifier/$repo/': typeof LayoutIdentifierRepoIndexRoute 53 72 } 54 73 export interface FileRouteTypes { 55 74 fileRoutesByFullPath: FileRoutesByFullPath 56 - fullPaths: '/login' | '/' | '/oauth/callback' 75 + fullPaths: 76 + | '/login' 77 + | '/' 78 + | '/oauth/callback' 79 + | '/$identifier' 80 + | '/$identifier/$repo' 57 81 fileRoutesByTo: FileRoutesByTo 58 - to: '/login' | '/' | '/oauth/callback' 82 + to: '/login' | '/' | '/oauth/callback' | '/$identifier' | '/$identifier/$repo' 59 83 id: 60 84 | '__root__' 61 85 | '/_layout' 62 86 | '/_layout/login' 63 87 | '/_layout/' 64 88 | '/_layout/oauth/callback' 89 + | '/_layout/$identifier/' 90 + | '/_layout/$identifier/$repo/' 65 91 fileRoutesById: FileRoutesById 66 92 } 67 93 export interface RootRouteChildren { ··· 91 117 preLoaderRoute: typeof LayoutLoginRouteImport 92 118 parentRoute: typeof LayoutRoute 93 119 } 120 + '/_layout/$identifier/': { 121 + id: '/_layout/$identifier/' 122 + path: '/$identifier' 123 + fullPath: '/$identifier' 124 + preLoaderRoute: typeof LayoutIdentifierIndexRouteImport 125 + parentRoute: typeof LayoutRoute 126 + } 94 127 '/_layout/oauth/callback': { 95 128 id: '/_layout/oauth/callback' 96 129 path: '/oauth/callback' ··· 98 131 preLoaderRoute: typeof LayoutOauthCallbackRouteImport 99 132 parentRoute: typeof LayoutRoute 100 133 } 134 + '/_layout/$identifier/$repo/': { 135 + id: '/_layout/$identifier/$repo/' 136 + path: '/$identifier/$repo' 137 + fullPath: '/$identifier/$repo' 138 + preLoaderRoute: typeof LayoutIdentifierRepoIndexRouteImport 139 + parentRoute: typeof LayoutRoute 140 + } 101 141 } 102 142 } 103 143 ··· 105 145 LayoutLoginRoute: typeof LayoutLoginRoute 106 146 LayoutIndexRoute: typeof LayoutIndexRoute 107 147 LayoutOauthCallbackRoute: typeof LayoutOauthCallbackRoute 148 + LayoutIdentifierIndexRoute: typeof LayoutIdentifierIndexRoute 149 + LayoutIdentifierRepoIndexRoute: typeof LayoutIdentifierRepoIndexRoute 108 150 } 109 151 110 152 const LayoutRouteChildren: LayoutRouteChildren = { 111 153 LayoutLoginRoute: LayoutLoginRoute, 112 154 LayoutIndexRoute: LayoutIndexRoute, 113 155 LayoutOauthCallbackRoute: LayoutOauthCallbackRoute, 156 + LayoutIdentifierIndexRoute: LayoutIdentifierIndexRoute, 157 + LayoutIdentifierRepoIndexRoute: LayoutIdentifierRepoIndexRoute, 114 158 } 115 159 116 160 const LayoutRouteWithChildren =
+9
src/routes/_layout/$identifier/$repo/index.tsx
··· 1 + import { createFileRoute } from '@tanstack/react-router' 2 + 3 + export const Route = createFileRoute('/_layout/$identifier/$repo/')({ 4 + component: RouteComponent, 5 + }) 6 + 7 + function RouteComponent() { 8 + return <div>Hello "/_layout/$identifier/$repo/"!</div> 9 + }
+9
src/routes/_layout/$identifier/index.tsx
··· 1 + import { createFileRoute } from '@tanstack/react-router' 2 + 3 + export const Route = createFileRoute('/_layout/$identifier/')({ 4 + component: RouteComponent, 5 + }) 6 + 7 + function RouteComponent() { 8 + return <div>Hello "/_layout/$identifier/"!</div> 9 + }