From ec11523cb808d0638ae19bdf7445df34eba7b6fd Mon Sep 17 00:00:00 2001 From: Pouria Delfanazari Date: Wed, 1 Oct 2025 17:23:46 -0700 Subject: [PATCH] fix: use rkey and handle for generating collection og image --- .../collections/[rkey]/opengraph-image.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/webapp/app/(dashboard)/profile/[handle]/(withoutHeader)/collections/[rkey]/opengraph-image.tsx b/src/webapp/app/(dashboard)/profile/[handle]/(withoutHeader)/collections/[rkey]/opengraph-image.tsx index f87a33cd..af5e8250 100644 --- a/src/webapp/app/(dashboard)/profile/[handle]/(withoutHeader)/collections/[rkey]/opengraph-image.tsx +++ b/src/webapp/app/(dashboard)/profile/[handle]/(withoutHeader)/collections/[rkey]/opengraph-image.tsx @@ -4,7 +4,7 @@ import OpenGraphCard from '@/features/openGraph/components/openGraphCard/OpenGra import { truncateText } from '@/lib/utils/text'; interface Props { - params: Promise<{ collectionId: string }>; + params: Promise<{ rkey: string; handle: string }>; } export const contentType = 'image/png'; @@ -14,14 +14,17 @@ export const size = { }; export default async function Image(props: Props) { - const { collectionId } = await props.params; + const { rkey, handle } = await props.params; const apiClient = new ApiClient( process.env.NEXT_PUBLIC_API_BASE_URL || 'http://localhost:3000', createClientTokenManager(), ); - const collection = await apiClient.getCollectionPage(collectionId); + const collection = await apiClient.getCollectionPageByAtUri({ + recordKey: rkey, + handle: handle, + }); return await OpenGraphCard({ children: ( -- 2.51.2