From bab6d6d3269639bafe0d421b8747c1393cb8f388 Mon Sep 17 00:00:00 2001 From: armando Date: Fri, 23 Feb 2024 10:47:17 -0800 Subject: [PATCH 1/6] feat: add more btns --- pages/[chain]/asset/[assetId].tsx | 16 ++++++++++++++++ pages/[chain]/collection/[contract].tsx | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/pages/[chain]/asset/[assetId].tsx b/pages/[chain]/asset/[assetId].tsx index d1382c1d3..f0459b8a4 100644 --- a/pages/[chain]/asset/[assetId].tsx +++ b/pages/[chain]/asset/[assetId].tsx @@ -272,6 +272,22 @@ const IndexPage: NextPage = ({ assetId, ssr }) => { property="fc:frame:button:1:target" content={`eip155:${token?.token?.chainId}:${token?.token?.contract}:${token?.token?.tokenId}`} /> + + {token?.market?.floorAsk?.price?.amount?.native && ( + <> + + + + + )} } /> diff --git a/pages/[chain]/collection/[contract].tsx b/pages/[chain]/collection/[contract].tsx index f632df66f..eef520e6b 100644 --- a/pages/[chain]/collection/[contract].tsx +++ b/pages/[chain]/collection/[contract].tsx @@ -396,6 +396,22 @@ const CollectionPage: NextPage = ({ id, ssr }) => { property="fc:frame:button:1:target" content={`eip155:${collection.chainId}:${collection.primaryContract}`} /> + + {collection.floorAsk?.price?.amount?.native && ( + <> + + + + + )} } /> From a50216cbb0dc33217e8c2ee60c67cc758f5d6538 Mon Sep 17 00:00:00 2001 From: armando Date: Fri, 23 Feb 2024 11:31:07 -0800 Subject: [PATCH 2/6] feat: kill old btns --- pages/[chain]/collection/[contract].tsx | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/pages/[chain]/collection/[contract].tsx b/pages/[chain]/collection/[contract].tsx index eef520e6b..d5aedc191 100644 --- a/pages/[chain]/collection/[contract].tsx +++ b/pages/[chain]/collection/[contract].tsx @@ -362,28 +362,6 @@ const CollectionPage: NextPage = ({ id, ssr }) => { description={ssr?.collection?.collections?.[0]?.description as string} metatags={ <> - - - - - - - = ({ id, ssr }) => { )} @@ -729,6 +707,7 @@ const CollectionPage: NextPage = ({ id, ssr }) => { css={{ pl: 42 }} placeholder="Search by token name" onChange={(e) => { + resetCache() setTokenSearchQuery(e.target.value) }} value={tokenSearchQuery} From 2ccba231e98719f79a6fe65b0268dd8d328f4895 Mon Sep 17 00:00:00 2001 From: armando Date: Fri, 23 Feb 2024 11:31:21 -0800 Subject: [PATCH 3/6] feat: remove old btns --- pages/[chain]/asset/[assetId].tsx | 32 +------------------------------ 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/pages/[chain]/asset/[assetId].tsx b/pages/[chain]/asset/[assetId].tsx index f0459b8a4..b89ba6823 100644 --- a/pages/[chain]/asset/[assetId].tsx +++ b/pages/[chain]/asset/[assetId].tsx @@ -242,30 +242,6 @@ const IndexPage: NextPage = ({ assetId, ssr }) => { property="og:title" content={`Farcaster: ${token?.token?.name}`} /> - - - - - - - - - = ({ assetId, ssr }) => { )} } /> - Date: Fri, 23 Feb 2024 11:34:50 -0800 Subject: [PATCH 4/6] Update [assetId].tsx --- pages/[chain]/asset/[assetId].tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/[chain]/asset/[assetId].tsx b/pages/[chain]/asset/[assetId].tsx index b89ba6823..b1dc125e6 100644 --- a/pages/[chain]/asset/[assetId].tsx +++ b/pages/[chain]/asset/[assetId].tsx @@ -264,9 +264,16 @@ const IndexPage: NextPage = ({ assetId, ssr }) => { /> )} + } /> + Date: Fri, 23 Feb 2024 11:37:22 -0800 Subject: [PATCH 5/6] feat: improve mint btm --- pages/[chain]/asset/[assetId].tsx | 43 ++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/pages/[chain]/asset/[assetId].tsx b/pages/[chain]/asset/[assetId].tsx index b1dc125e6..c3bf06beb 100644 --- a/pages/[chain]/asset/[assetId].tsx +++ b/pages/[chain]/asset/[assetId].tsx @@ -228,6 +228,22 @@ const IndexPage: NextPage = ({ assetId, ssr }) => { const base64EncodedToken = btoa(encodeURIComponent(JSON.stringify(token))) + const mintData = collection?.mintStages?.find( + (stage) => stage.kind === 'public' + ) + + const mintPriceDecimal = mintData?.price?.amount?.decimal + const mintCurrency = mintData?.price?.currency?.symbol?.toUpperCase() + + const mintPrice = + typeof mintPriceDecimal === 'number' && + mintPriceDecimal !== null && + mintPriceDecimal !== undefined + ? mintPriceDecimal === 0 + ? 'Free' + : `${mintPriceDecimal} ${mintCurrency}` + : undefined + return ( = ({ assetId, ssr }) => { description={collection?.description as string} metatags={ <> - - - - + {collection?.isMinting && ( + <> + + + + + + )} {token?.market?.floorAsk?.price?.amount?.native && ( <> From 06b9419b890dcf12eb44173b34ef98eaf7bb8528 Mon Sep 17 00:00:00 2001 From: armando Date: Fri, 23 Feb 2024 14:23:31 -0800 Subject: [PATCH 6/6] Update [contract].tsx --- pages/[chain]/collection/[contract].tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/pages/[chain]/collection/[contract].tsx b/pages/[chain]/collection/[contract].tsx index d5aedc191..65a143f10 100644 --- a/pages/[chain]/collection/[contract].tsx +++ b/pages/[chain]/collection/[contract].tsx @@ -707,7 +707,6 @@ const CollectionPage: NextPage = ({ id, ssr }) => { css={{ pl: 42 }} placeholder="Search by token name" onChange={(e) => { - resetCache() setTokenSearchQuery(e.target.value) }} value={tokenSearchQuery}