Skip to content

Commit

Permalink
Merge pull request #478 from reservoirprotocol/armando/grwth-4132-add…
Browse files Browse the repository at this point in the history
…-frame-tags-to-collections-page

feat: frames for collections
  • Loading branch information
r3lays committed Feb 22, 2024
2 parents cffb44f + e93746f commit aa58bcb
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pages/[chain]/asset/[assetId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const IndexPage: NextPage<Props> = ({ assetId, ssr }) => {
<meta property="fc:frame:button:1:action" content="mint" />
<meta
property="fc:frame:button:1:target"
content={`eip155:7777777:${token?.token?.contract}:${token?.token?.tokenId}`}
content={`eip155:${token?.token?.chainId}:${token?.token?.contract}:${token?.token?.tokenId}`}
/>
</>
}
Expand Down
39 changes: 39 additions & 0 deletions pages/[chain]/collection/[contract].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
useCollectionActivity,
useDynamicTokens,
useAttributes,
useReservoirClient,
} from '@reservoir0x/reservoir-kit-ui'
import { paths } from '@reservoir0x/reservoir-sdk'
import Layout from 'components/Layout'
Expand Down Expand Up @@ -81,6 +82,7 @@ const CollectionPage: NextPage<Props> = ({ id, ssr }) => {
const [activityFiltersOpen, setActivityFiltersOpen] = useState(true)
const [tokenSearchQuery, setTokenSearchQuery] = useState<string>('')
const chainCurrency = useChainCurrency()
const client = useReservoirClient()
const debouncedSearch = useDebounce(tokenSearchQuery, 500)
const [socketState, setSocketState] = useState<SocketState>(null)
const [activityTypes, setActivityTypes] = useState<ActivityTypes>([
Expand Down Expand Up @@ -359,6 +361,43 @@ const CollectionPage: NextPage<Props> = ({ id, ssr }) => {
ogImage={ssr?.collection?.collections?.[0]?.banner}
title={ssr?.collection?.collections?.[0]?.name}
description={ssr?.collection?.collections?.[0]?.description as string}
metatags={
<>
<meta
property="og:title"
content={`Farcaster: ${collection?.name}`}
/>

<meta
property="eth:nft:collection"
content={`Farcaster: ${collection?.name}`}
/>
<meta
property="eth:nft:contract_address"
content={collection?.primaryContract}
/>
<meta
property="eth:nft:creator_address"
content={collection?.creator}
/>
<meta
property="eth:nft:schema"
content={collection?.contractKind?.toUpperCase()}
/>
<meta
property="eth:nft:media_url"
content={collection.banner || collection.image}
/>
<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:${
collection?.chainId
}:${collection.primaryContract?.toLowerCase()}`}
/>
</>
}
/>
<Tabs.Root
defaultValue="items"
Expand Down

0 comments on commit aa58bcb

Please sign in to comment.