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: recipe author view

+6 -5
+3 -2
apps/api/src/xrpc/index.ts
··· 1 1 import { Hono } from 'hono'; 2 2 import { db, recipeTable } from '@cookware/database'; 3 - import { and, eq, sql } from 'drizzle-orm'; 3 + import { and, desc, eq, sql } from 'drizzle-orm'; 4 4 import { DID, getDidDoc, getDidFromHandleOrDid, parseDid } from '@cookware/lexicons'; 5 5 6 6 export const xrpcApp = new Hono(); ··· 24 24 uri: sql`concat(${recipeTable.authorDid}, "/", ${recipeTable.rkey})`.as('uri'), 25 25 }) 26 26 .from(recipeTable) 27 - .where(did ? eq(recipeTable.authorDid, did) : undefined); 27 + .where(did ? eq(recipeTable.authorDid, did) : undefined) 28 + .orderBy(desc(recipeTable.createdAt)); 28 29 29 30 const results = []; 30 31 const eachRecipe = async (r: typeof recipes[0]) => ({
+1 -1
apps/web/src/queries/recipe.ts
··· 9 9 export const useRecipesQuery = (cursor: string, did?: string) => { 10 10 const { rpc } = useXrpc(); 11 11 return useQuery({ 12 - queryKey: RQKEY(cursor, '', ''), 12 + queryKey: RQKEY(cursor, did ?? '', ''), 13 13 queryFn: async () => { 14 14 const res = await rpc.get('moe.hayden.cookware.getRecipes', { 15 15 params: { cursor, did },
+2 -2
apps/web/src/routes/_.(app)/recipes/$author/index.lazy.tsx
··· 49 49 </div> 50 50 </header> 51 51 <div className="flex flex-col gap-4 p-4 pt-6 items-center"> 52 - <h1 className="text-4xl font-black">Community Recipes!</h1> 53 - <p className="text-lg">See what the community's been cooking.</p> 52 + <h1 className="text-4xl font-black">{author}'s recipes!</h1> 53 + <p className="text-lg">See what they've been cooking.</p> 54 54 </div> 55 55 <div className="flex-1 flex flex-col items-center p-4"> 56 56 <div className="flex flex-col gap-4 max-w-2xl w-full items-center">