diff --git a/src/app/memes/[id]/page.tsx b/src/app/memes/[id]/page.tsx new file mode 100644 index 0000000..433a357 --- /dev/null +++ b/src/app/memes/[id]/page.tsx @@ -0,0 +1,57 @@ +import type { Metadata, ResolvingMetadata } from 'next' + +type Props = { + params: { id: string } + searchParams: { [key: string]: string | string[] | undefined } +} + +export async function generateMetadata( + { params, searchParams }: Props, + parent: ResolvingMetadata +): Promise { + const id = (await params).id + + const product = { + title: 'Generated meme', + imageUrl: 'https://jade-wonderful-barnacle-735.mypinata.cloud/ipfs/bafybeiaojxp5jkr3vc5t4ruopet4fsxgn7kjsmwi3bu6w7g7r2vpt2jj2q', + description: 'A funny meme', + } + + return { + title: product.title, + metadataBase: new URL('https://memes.markto.market'), + openGraph: { + type: "website", + url: `https://memes.markto.market/memes/${id}`, + siteName: "Mark's meme market", + images: [{ + url: product.imageUrl, + }, ], + } + + } +} + +export default async function MemePage({ params }: Props) { + const product = { + title: 'Generated meme', + imageUrl: 'https://jade-wonderful-barnacle-735.mypinata.cloud/ipfs/bafybeiaojxp5jkr3vc5t4ruopet4fsxgn7kjsmwi3bu6w7g7r2vpt2jj2q', + description: 'A funny meme', + } + + return ( +
+
+

{product.title}

+
+ {product.title} +
+

{product.description}

+
+
+ ); +}