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: rename $did to $author

+27 -27
+20 -20
apps/web/src/routeTree.gen.ts
··· 13 13 // Import Routes 14 14 15 15 import { Route as rootRoute } from './routes/__root' 16 - import { Route as appRecipesDidRkeyImport } from './routes/(app)/recipes.$did.$rkey' 16 + import { Route as appRecipesAuthorRkeyImport } from './routes/(app)/recipes/$author/$rkey' 17 17 18 18 // Create Virtual Routes 19 19 ··· 38 38 } as any) 39 39 .lazy(() => import('./routes/(auth)/login.lazy').then((d) => d.Route)) 40 40 41 - const appRecipesDidRkeyRoute = appRecipesDidRkeyImport.update({ 42 - id: '/(app)/recipes/$did/$rkey', 43 - path: '/recipes/$did/$rkey', 41 + const appRecipesAuthorRkeyRoute = appRecipesAuthorRkeyImport.update({ 42 + id: '/(app)/recipes/$author/$rkey', 43 + path: '/recipes/$author/$rkey', 44 44 getParentRoute: () => rootRoute, 45 45 } as any) 46 46 ··· 62 62 preLoaderRoute: typeof appIndexLazyImport 63 63 parentRoute: typeof rootRoute 64 64 } 65 - '/(app)/recipes/$did/$rkey': { 66 - id: '/(app)/recipes/$did/$rkey' 67 - path: '/recipes/$did/$rkey' 68 - fullPath: '/recipes/$did/$rkey' 69 - preLoaderRoute: typeof appRecipesDidRkeyImport 65 + '/(app)/recipes/$author/$rkey': { 66 + id: '/(app)/recipes/$author/$rkey' 67 + path: '/recipes/$author/$rkey' 68 + fullPath: '/recipes/$author/$rkey' 69 + preLoaderRoute: typeof appRecipesAuthorRkeyImport 70 70 parentRoute: typeof rootRoute 71 71 } 72 72 } ··· 77 77 export interface FileRoutesByFullPath { 78 78 '/login': typeof authLoginLazyRoute 79 79 '/': typeof appIndexLazyRoute 80 - '/recipes/$did/$rkey': typeof appRecipesDidRkeyRoute 80 + '/recipes/$author/$rkey': typeof appRecipesAuthorRkeyRoute 81 81 } 82 82 83 83 export interface FileRoutesByTo { 84 84 '/login': typeof authLoginLazyRoute 85 85 '/': typeof appIndexLazyRoute 86 - '/recipes/$did/$rkey': typeof appRecipesDidRkeyRoute 86 + '/recipes/$author/$rkey': typeof appRecipesAuthorRkeyRoute 87 87 } 88 88 89 89 export interface FileRoutesById { 90 90 __root__: typeof rootRoute 91 91 '/(auth)/login': typeof authLoginLazyRoute 92 92 '/(app)/': typeof appIndexLazyRoute 93 - '/(app)/recipes/$did/$rkey': typeof appRecipesDidRkeyRoute 93 + '/(app)/recipes/$author/$rkey': typeof appRecipesAuthorRkeyRoute 94 94 } 95 95 96 96 export interface FileRouteTypes { 97 97 fileRoutesByFullPath: FileRoutesByFullPath 98 - fullPaths: '/login' | '/' | '/recipes/$did/$rkey' 98 + fullPaths: '/login' | '/' | '/recipes/$author/$rkey' 99 99 fileRoutesByTo: FileRoutesByTo 100 - to: '/login' | '/' | '/recipes/$did/$rkey' 101 - id: '__root__' | '/(auth)/login' | '/(app)/' | '/(app)/recipes/$did/$rkey' 100 + to: '/login' | '/' | '/recipes/$author/$rkey' 101 + id: '__root__' | '/(auth)/login' | '/(app)/' | '/(app)/recipes/$author/$rkey' 102 102 fileRoutesById: FileRoutesById 103 103 } 104 104 105 105 export interface RootRouteChildren { 106 106 authLoginLazyRoute: typeof authLoginLazyRoute 107 107 appIndexLazyRoute: typeof appIndexLazyRoute 108 - appRecipesDidRkeyRoute: typeof appRecipesDidRkeyRoute 108 + appRecipesAuthorRkeyRoute: typeof appRecipesAuthorRkeyRoute 109 109 } 110 110 111 111 const rootRouteChildren: RootRouteChildren = { 112 112 authLoginLazyRoute: authLoginLazyRoute, 113 113 appIndexLazyRoute: appIndexLazyRoute, 114 - appRecipesDidRkeyRoute: appRecipesDidRkeyRoute, 114 + appRecipesAuthorRkeyRoute: appRecipesAuthorRkeyRoute, 115 115 } 116 116 117 117 export const routeTree = rootRoute ··· 126 126 "children": [ 127 127 "/(auth)/login", 128 128 "/(app)/", 129 - "/(app)/recipes/$did/$rkey" 129 + "/(app)/recipes/$author/$rkey" 130 130 ] 131 131 }, 132 132 "/(auth)/login": { ··· 135 135 "/(app)/": { 136 136 "filePath": "(app)/index.lazy.tsx" 137 137 }, 138 - "/(app)/recipes/$did/$rkey": { 139 - "filePath": "(app)/recipes.$did.$rkey.tsx" 138 + "/(app)/recipes/$author/$rkey": { 139 + "filePath": "(app)/recipes/$author/$rkey.tsx" 140 140 } 141 141 } 142 142 }
+6 -6
apps/web/src/routes/(app)/recipes.$did.$rkey.tsx apps/web/src/routes/(app)/recipes/$author/$rkey.tsx
··· 15 15 import { useSuspenseQuery } from '@tanstack/react-query' 16 16 import { rpc } from '@/hooks/use-xrpc' 17 17 18 - export const Route = createFileRoute('/(app)/recipes/$did/$rkey')({ 19 - loader: ({ params: { did, rkey }, }) => { 20 - queryClient.ensureQueryData(recipeQueryOptions(rpc, did, rkey)); 18 + export const Route = createFileRoute('/(app)/recipes/$author/$rkey')({ 19 + loader: ({ params: { author, rkey }, }) => { 20 + queryClient.ensureQueryData(recipeQueryOptions(rpc, author, rkey)); 21 21 }, 22 22 23 23 component: RouteComponent, 24 24 }) 25 25 26 26 function RouteComponent() { 27 - const { did, rkey } = Route.useParams() 27 + const { author, rkey } = Route.useParams() 28 28 const { 29 29 data: { recipe }, 30 - } = useSuspenseQuery(recipeQueryOptions(rpc, did, rkey)); 30 + } = useSuspenseQuery(recipeQueryOptions(rpc, author, rkey)); 31 31 32 32 return ( 33 33 <> ··· 46 46 </BreadcrumbItem> 47 47 <BreadcrumbSeparator className="hidden md:block" /> 48 48 <BreadcrumbItem className="hidden md:block"> 49 - <BreadcrumbLink asChild><Link href={`/profiles/${did}`}>{recipe.author.handle}</Link></BreadcrumbLink> 49 + <BreadcrumbLink asChild><Link href={`/profiles/${recipe.author.handle}`}>{recipe.author.handle}</Link></BreadcrumbLink> 50 50 </BreadcrumbItem> 51 51 <BreadcrumbSeparator className="hidden md:block" /> 52 52 <BreadcrumbItem>
+1 -1
apps/web/src/screens/Recipes/RecipeCard.tsx
··· 18 18 19 19 export const RecipeCard = ({ rkey, author, ...recipe }: RecipeCardProps) => { 20 20 return ( 21 - <Link to="/recipes/$did/$rkey" params={{ did: author, rkey }}> 21 + <Link to="/recipes/$author/$rkey" params={{ author, rkey }}> 22 22 <Card> 23 23 <CardHeader> 24 24 <CardTitle>{recipe.title}</CardTitle>