From f3cc31dd4cb9f35d8f828080a9c6f27f076384f6 Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Thu, 16 Oct 2025 18:57:27 -0400 Subject: [PATCH] fix pub title in metadata --- app/lish/[did]/[publication]/[rkey]/page.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/lish/[did]/[publication]/[rkey]/page.tsx b/app/lish/[did]/[publication]/[rkey]/page.tsx index 4a5398c7..e4ba28df 100644 --- a/app/lish/[did]/[publication]/[rkey]/page.tsx +++ b/app/lish/[did]/[publication]/[rkey]/page.tsx @@ -27,13 +27,12 @@ export async function generateMetadata(props: { }): Promise { let params = await props.params; let did = decodeURIComponent(params.did); - let publication = decodeURIComponent(params.publication); if (!did) return { title: "Publication 404" }; let [{ data: document }] = await Promise.all([ supabaseServerClient .from("documents") - .select("*") + .select("*, documents_in_publications(publications(*))") .eq("uri", AtUri.make(did, ids.PubLeafletDocument, params.rkey)) .single(), ]); @@ -42,7 +41,10 @@ export async function generateMetadata(props: { let docRecord = document.data as PubLeafletDocument.Record; return { - title: docRecord.title + " - " + publication, + title: + docRecord.title + + " - " + + document.documents_in_publications[0]?.publications?.name, description: docRecord?.description || "", }; } -- 2.51.2