From a04cda1e5a6e698248f5ed097fad4d7bd7f3b89c Mon Sep 17 00:00:00 2001 From: MananTank Date: Fri, 18 Oct 2024 17:00:19 +0000 Subject: [PATCH] Improve chain page Open graph metadata + image (#5081) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem solved Short description of the bug fixed or feature added --- ## PR-Codex overview This PR focuses on enhancing the Open Graph metadata and improving the layout of the `chainPage` component in the dashboard application. ### Detailed summary - In `layout.tsx`, added an `openGraph` object containing `title` and `description`. - In `opengraph-image.tsx`, added the `objectFit` property with the value `"contain"` for image styling. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx | 4 ++++ .../(chain)/[chain_id]/(chainPage)/opengraph-image.tsx | 1 + 2 files changed, 5 insertions(+) diff --git a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx index 6d6d7e1c134..e2fe40d0c2e 100644 --- a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx +++ b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx @@ -46,6 +46,10 @@ export async function generateMetadata({ return { title, description, + openGraph: { + title, + description, + }, }; } diff --git a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/opengraph-image.tsx b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/opengraph-image.tsx index d1e8a60e8ec..bbc548926b7 100644 --- a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/opengraph-image.tsx +++ b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/opengraph-image.tsx @@ -122,6 +122,7 @@ export default async function Image({ right: -2, height: 150, width: 150, + objectFit: "contain", }} /> )}