Skip to content

Commit

Permalink
feat: attempt to make og image on token page work (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
YohanTz authored Oct 8, 2024
1 parent 4d27df7 commit 0e866c5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
10 changes: 6 additions & 4 deletions apps/arkmarket/src/app/collection/[collectionAddress]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ export default async function CollectionPage({ params }: CollectionPageProps) {

return (
<>
<meta
property="og:image"
content={`https://ark-market-unframed.vercel.app/api/og/collection?collection_address=${collectionAddress}`}
/>
<head>
<meta
property="og:image"
content={`https://ark-market-unframed.vercel.app/api/og/collection?collection_address=${collectionAddress}`}
/>
</head>

<div className="flex min-h-[calc(100vh-var(--site-header-height))] flex-col">
<CollectionBanner
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use server";

import { notFound } from "next/navigation";

import type { Token, TokenMarketData } from "~/types";
Expand Down Expand Up @@ -45,10 +47,12 @@ export default async function TokenPage({

return (
<>
<meta
property="og:image"
content={`https://ark-market-unframed.vercel.app/api/og/token?collection_address=${contractAddress}&token_id=${tokenId}`}
/>
<head>
<meta
property="og:image"
content={`https://ark-market-unframed.vercel.app/api/og/token?collection_address=${contractAddress}&token_id=${tokenId}`}
/>
</head>
<main className="mx-auto max-w-[120rem] p-5 pt-0 lg:p-8">
<div className="grid grid-cols-1 gap-5 lg:grid-cols-[minmax(0,1fr)_minmax(0,2fr)] lg:gap-8">
<TokenSummary
Expand Down

0 comments on commit 0e866c5

Please sign in to comment.