a tool for shared writing and social publishing
0
fork

Configure Feed

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

fix pub title in metadata

+5 -3
+5 -3
app/lish/[did]/[publication]/[rkey]/page.tsx
··· 27 27 }): Promise<Metadata> { 28 28 let params = await props.params; 29 29 let did = decodeURIComponent(params.did); 30 - let publication = decodeURIComponent(params.publication); 31 30 if (!did) return { title: "Publication 404" }; 32 31 33 32 let [{ data: document }] = await Promise.all([ 34 33 supabaseServerClient 35 34 .from("documents") 36 - .select("*") 35 + .select("*, documents_in_publications(publications(*))") 37 36 .eq("uri", AtUri.make(did, ids.PubLeafletDocument, params.rkey)) 38 37 .single(), 39 38 ]); ··· 42 41 let docRecord = document.data as PubLeafletDocument.Record; 43 42 44 43 return { 45 - title: docRecord.title + " - " + publication, 44 + title: 45 + docRecord.title + 46 + " - " + 47 + document.documents_in_publications[0]?.publications?.name, 46 48 description: docRecord?.description || "", 47 49 }; 48 50 }