Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: attempt to make og image on token page work #193

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading