Skip to content

Commit

Permalink
feat: update og metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
MartianGreed committed Dec 5, 2024
1 parent 852dc84 commit 79c97f3
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion apps/arkmarket/src/app/collection/[collectionAddress]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import CollectionBanner from "./components/collection-banner";
import CollectionHeader from "./components/collection-header";
import CollectionItems from "./components/collection-items";
import MobileCollectionHeader from "./components/mobile-collection-header";
import { CollectionDescription } from "~/config/homepage";
import { ChainId, CollectionAddresses, CollectionDescription, Collections } from "~/config/homepage";

interface GenerateMetadataProps {
params: Promise<{ collectionAddress: string }>;
Expand All @@ -18,6 +18,27 @@ export async function generateMetadata({
}: GenerateMetadataProps): Promise<Metadata> {
const collectionAddress = (await params).collectionAddress;
const collection = await getCollection({ collectionAddress });
if (collectionAddress === CollectionAddresses[Collections.ETERNUMSEASONPASS][ChainId.SN_MAIN]) {
return {
title: `Eternum Season 0 Pass`,
description: 'Conquer the Realms',
openGraph: {
images: [
{
url: `https://empire.realms.world/og-image.png`,
height: 630,
width: 1200,
},
{
url: `https://market.realms.world/collections/eternum-season-pass.png`,
height: 1362,
width: 1362,
},
],
},

}
}
const platform =
env.NEXT_PUBLIC_THEME === "unframed" ? "Unframed" : "Ark Market";
const name = collection?.name ?? "Collection";
Expand Down

0 comments on commit 79c97f3

Please sign in to comment.