Skip to content

Commit

Permalink
feat: force tag spot
Browse files Browse the repository at this point in the history
  • Loading branch information
r3lays committed Feb 8, 2024
1 parent 769794e commit f8895fe
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 55 deletions.
50 changes: 35 additions & 15 deletions components/Head.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { FC } from 'react'
import NextHead from 'next/head'
import { Token } from '@reservoir0x/reservoir-kit-ui'

type Props = {
ogImage?: string
title?: string
description?: string
metatags?: React.ReactNode
token?: Token
}

/**
Expand All @@ -18,7 +19,7 @@ export const Head: FC<Props> = ({
ogImage = 'https://explorer.reservoir.tools/og-image.png',
title = 'Reservoir | Multi-Chain NF`T Explorer',
description = 'Reservoir Multi-Chain NFT Explorer is an open source NFT explorer built with Reservoir.',
metatags = null,
token,
}) => {
return (
<NextHead>
Expand All @@ -38,20 +39,39 @@ export const Head: FC<Props> = ({
<meta name="twitter:description" content={description} />
<meta name="twitter:image" content={ogImage} />

{/* Open Graph */}
<meta property="og:type" content="website" />
<meta property="og:determiner" content="the" />
<meta property="og:locale" content="en" />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={ogImage} />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="Reservoir NFT Explorer Banner" />

{/* Extra Metatas */}
{metatags && metatags}
<>
<meta property="fc:frame" content="vNext" />
<meta property="fc:frame:image" content={token?.token?.imageSmall} />
<meta property="fc:frame:button:1" content="Mint" />
<meta property="fc:frame:button:1:action" content="mint" />
<meta
property="fc:frame:button:1:target"
content="eip155:7777777:0x2e92b5094c531257a9f427def7c05b412b9056bb:18"
/>
<meta property="eth:nft:collection" content="taboo9" />
<meta property="eth:nft:status" content="live" />
<meta property="eth:nft:mint_count" content="1" />
<meta
property="eth:nft:creator_address"
content="0xf90665f14eefda57144441743816f4740cc89722"
/>
<meta
property="eth:nft:contract_address"
content="0x2e92b5094c531257a9f427def7c05b412b9056bb"
/>
<meta property="eth:nft:schema" content="ERC1155" />
<meta property="eth:nft:endtime" content="1709944871000" />
<meta property="og:image" content={token?.token?.imageSmall} />
<meta property="fc:frame" content="vNext" />
<meta property="fc:frame:button:1" content="View on Reservoir" />
<meta property="fc:frame:button:1:action" content="post_redirect" />
<meta
property="fc:frame:post_url"
content="https://explorer.reservoir.tools/"
/>
<meta property="fc:frame:image" content={token?.token?.imageSmall} />
</>
</NextHead>
)
}
41 changes: 1 addition & 40 deletions pages/[chain]/asset/[assetId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,48 +234,9 @@ const IndexPage: NextPage<Props> = ({ assetId, ssr }) => {
ogImage={`/api/og/token?token=${encodeURIComponent(
base64EncodedToken
)}`}
token={token}
title={pageTitle}
description={collection?.description as string}
metatags={
<>
<meta property="fc:frame" content="vNext" />
<meta
property="fc:frame:image"
content={token?.token?.imageSmall}
/>
<meta property="fc:frame:button:1" content="Mint" />
<meta property="fc:frame:button:1:action" content="mint" />
<meta
property="fc:frame:button:1:target"
content="eip155:7777777:0x2e92b5094c531257a9f427def7c05b412b9056bb:18"
/>
<meta property="eth:nft:collection" content="taboo9" />
<meta property="eth:nft:status" content="live" />
<meta property="eth:nft:mint_count" content="1" />
<meta
property="eth:nft:creator_address"
content="0xf90665f14eefda57144441743816f4740cc89722"
/>
<meta
property="eth:nft:contract_address"
content="0x2e92b5094c531257a9f427def7c05b412b9056bb"
/>
<meta property="eth:nft:schema" content="ERC1155" />
<meta property="eth:nft:endtime" content="1709944871000" />
<meta property="og:image" content={token?.token?.imageSmall} />
<meta property="fc:frame" content="vNext" />
<meta property="fc:frame:button:1" content="View on Reservoir" />
<meta property="fc:frame:button:1:action" content="post_redirect" />
<meta
property="fc:frame:post_url"
content="https://explorer.reservoir.tools/"
/>
<meta
property="fc:frame:image"
content={token?.token?.imageSmall}
/>
</>
}
/>
<Flex
justify="center"
Expand Down

0 comments on commit f8895fe

Please sign in to comment.