The recipes.blue monorepo recipes.blue
recipes appview atproto
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: move $author/$rkey view to own file

+37 -32
+35 -27
apps/web/src/routeTree.gen.ts
··· 14 14 15 15 import { Route as rootRoute } from './routes/__root' 16 16 import { Route as Import } from './routes/_' 17 - import { Route as appRecipesAuthorRkeyImport } from './routes/_.(app)/recipes/$author/$rkey' 18 17 19 18 // Create Virtual Routes 20 19 ··· 23 22 const appRecipesNewLazyImport = createFileRoute('/_/(app)/recipes/new')() 24 23 const appRecipesAuthorIndexLazyImport = createFileRoute( 25 24 '/_/(app)/recipes/$author/', 25 + )() 26 + const appRecipesAuthorRkeyIndexLazyImport = createFileRoute( 27 + '/_/(app)/recipes/$author/$rkey/', 26 28 )() 27 29 28 30 // Create/Update Routes ··· 66 68 import('./routes/_.(app)/recipes/$author/index.lazy').then((d) => d.Route), 67 69 ) 68 70 69 - const appRecipesAuthorRkeyRoute = appRecipesAuthorRkeyImport.update({ 70 - id: '/(app)/recipes/$author/$rkey', 71 - path: '/recipes/$author/$rkey', 72 - getParentRoute: () => Route, 73 - } as any) 71 + const appRecipesAuthorRkeyIndexLazyRoute = appRecipesAuthorRkeyIndexLazyImport 72 + .update({ 73 + id: '/(app)/recipes/$author/$rkey/', 74 + path: '/recipes/$author/$rkey/', 75 + getParentRoute: () => Route, 76 + } as any) 77 + .lazy(() => 78 + import('./routes/_.(app)/recipes/$author/$rkey/index.lazy').then( 79 + (d) => d.Route, 80 + ), 81 + ) 74 82 75 83 // Populate the FileRoutesByPath interface 76 84 ··· 104 112 preLoaderRoute: typeof appRecipesNewLazyImport 105 113 parentRoute: typeof rootRoute 106 114 } 107 - '/_/(app)/recipes/$author/$rkey': { 108 - id: '/_/(app)/recipes/$author/$rkey' 109 - path: '/recipes/$author/$rkey' 110 - fullPath: '/recipes/$author/$rkey' 111 - preLoaderRoute: typeof appRecipesAuthorRkeyImport 112 - parentRoute: typeof rootRoute 113 - } 114 115 '/_/(app)/recipes/$author/': { 115 116 id: '/_/(app)/recipes/$author/' 116 117 path: '/recipes/$author' ··· 118 119 preLoaderRoute: typeof appRecipesAuthorIndexLazyImport 119 120 parentRoute: typeof rootRoute 120 121 } 122 + '/_/(app)/recipes/$author/$rkey/': { 123 + id: '/_/(app)/recipes/$author/$rkey/' 124 + path: '/recipes/$author/$rkey' 125 + fullPath: '/recipes/$author/$rkey' 126 + preLoaderRoute: typeof appRecipesAuthorRkeyIndexLazyImport 127 + parentRoute: typeof rootRoute 128 + } 121 129 } 122 130 } 123 131 ··· 127 135 authLoginLazyRoute: typeof authLoginLazyRoute 128 136 appIndexLazyRoute: typeof appIndexLazyRoute 129 137 appRecipesNewLazyRoute: typeof appRecipesNewLazyRoute 130 - appRecipesAuthorRkeyRoute: typeof appRecipesAuthorRkeyRoute 131 138 appRecipesAuthorIndexLazyRoute: typeof appRecipesAuthorIndexLazyRoute 139 + appRecipesAuthorRkeyIndexLazyRoute: typeof appRecipesAuthorRkeyIndexLazyRoute 132 140 } 133 141 134 142 const RouteChildren: RouteChildren = { 135 143 authLoginLazyRoute: authLoginLazyRoute, 136 144 appIndexLazyRoute: appIndexLazyRoute, 137 145 appRecipesNewLazyRoute: appRecipesNewLazyRoute, 138 - appRecipesAuthorRkeyRoute: appRecipesAuthorRkeyRoute, 139 146 appRecipesAuthorIndexLazyRoute: appRecipesAuthorIndexLazyRoute, 147 + appRecipesAuthorRkeyIndexLazyRoute: appRecipesAuthorRkeyIndexLazyRoute, 140 148 } 141 149 142 150 const RouteWithChildren = Route._addFileChildren(RouteChildren) ··· 146 154 '/login': typeof authLoginLazyRoute 147 155 '/': typeof appIndexLazyRoute 148 156 '/recipes/new': typeof appRecipesNewLazyRoute 149 - '/recipes/$author/$rkey': typeof appRecipesAuthorRkeyRoute 150 157 '/recipes/$author': typeof appRecipesAuthorIndexLazyRoute 158 + '/recipes/$author/$rkey': typeof appRecipesAuthorRkeyIndexLazyRoute 151 159 } 152 160 153 161 export interface FileRoutesByTo { 154 162 '/login': typeof authLoginLazyRoute 155 163 '/': typeof appIndexLazyRoute 156 164 '/recipes/new': typeof appRecipesNewLazyRoute 157 - '/recipes/$author/$rkey': typeof appRecipesAuthorRkeyRoute 158 165 '/recipes/$author': typeof appRecipesAuthorIndexLazyRoute 166 + '/recipes/$author/$rkey': typeof appRecipesAuthorRkeyIndexLazyRoute 159 167 } 160 168 161 169 export interface FileRoutesById { ··· 164 172 '/_/(auth)/login': typeof authLoginLazyRoute 165 173 '/_/(app)/': typeof appIndexLazyRoute 166 174 '/_/(app)/recipes/new': typeof appRecipesNewLazyRoute 167 - '/_/(app)/recipes/$author/$rkey': typeof appRecipesAuthorRkeyRoute 168 175 '/_/(app)/recipes/$author/': typeof appRecipesAuthorIndexLazyRoute 176 + '/_/(app)/recipes/$author/$rkey/': typeof appRecipesAuthorRkeyIndexLazyRoute 169 177 } 170 178 171 179 export interface FileRouteTypes { ··· 175 183 | '/login' 176 184 | '/' 177 185 | '/recipes/new' 178 - | '/recipes/$author/$rkey' 179 186 | '/recipes/$author' 187 + | '/recipes/$author/$rkey' 180 188 fileRoutesByTo: FileRoutesByTo 181 189 to: 182 190 | '/login' 183 191 | '/' 184 192 | '/recipes/new' 193 + | '/recipes/$author' 185 194 | '/recipes/$author/$rkey' 186 - | '/recipes/$author' 187 195 id: 188 196 | '__root__' 189 197 | '/_' 190 198 | '/_/(auth)/login' 191 199 | '/_/(app)/' 192 200 | '/_/(app)/recipes/new' 193 - | '/_/(app)/recipes/$author/$rkey' 194 201 | '/_/(app)/recipes/$author/' 202 + | '/_/(app)/recipes/$author/$rkey/' 195 203 fileRoutesById: FileRoutesById 196 204 } 197 205 ··· 222 230 "/_/(auth)/login", 223 231 "/_/(app)/", 224 232 "/_/(app)/recipes/new", 225 - "/_/(app)/recipes/$author/$rkey", 226 - "/_/(app)/recipes/$author/" 233 + "/_/(app)/recipes/$author/", 234 + "/_/(app)/recipes/$author/$rkey/" 227 235 ] 228 236 }, 229 237 "/_/(auth)/login": { ··· 238 246 "filePath": "_.(app)/recipes/new.lazy.tsx", 239 247 "parent": "/_" 240 248 }, 241 - "/_/(app)/recipes/$author/$rkey": { 242 - "filePath": "_.(app)/recipes/$author/$rkey.tsx", 249 + "/_/(app)/recipes/$author/": { 250 + "filePath": "_.(app)/recipes/$author/index.lazy.tsx", 243 251 "parent": "/_" 244 252 }, 245 - "/_/(app)/recipes/$author/": { 246 - "filePath": "_.(app)/recipes/$author/index.lazy.tsx", 253 + "/_/(app)/recipes/$author/$rkey/": { 254 + "filePath": "_.(app)/recipes/$author/$rkey/index.lazy.tsx", 247 255 "parent": "/_" 248 256 } 249 257 }
+2 -5
apps/web/src/routes/_.(app)/recipes/$author/$rkey.tsx apps/web/src/routes/_.(app)/recipes/$author/$rkey/index.lazy.tsx
··· 1 - import { createFileRoute, Link } from '@tanstack/react-router' 1 + import { createLazyFileRoute, Link } from '@tanstack/react-router' 2 2 import { 3 3 Breadcrumb, 4 4 BreadcrumbItem, ··· 14 14 import { useSuspenseQuery } from '@tanstack/react-query' 15 15 import { useXrpc } from '@/hooks/use-xrpc' 16 16 17 - export const Route = createFileRoute('/_/(app)/recipes/$author/$rkey')({ 18 - //loader: ({ params: { author, rkey } }) => { 19 - // queryClient.ensureQueryData(recipeQueryOptions(rpc, author, rkey)) 20 - //}, 17 + export const Route = createLazyFileRoute('/_/(app)/recipes/$author/$rkey/')({ 21 18 component: RouteComponent, 22 19 }) 23 20