File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type { ThirdwebContract } from "thirdweb";
22import * as ERC721Ext from "thirdweb/extensions/erc721" ;
33import * as ERC1155Ext from "thirdweb/extensions/erc1155" ;
44import { BatchLazyMintButton } from "./components/batch-lazy-mint-button" ;
5+ import { BatchUpdateMetadataButton } from "./components/batch-update-metadata-button" ;
56import { NFTClaimButton } from "./components/claim-button" ;
67import { NFTLazyMintButton } from "./components/lazy-mint-button" ;
78import { NFTMintButton } from "./components/mint-button" ;
@@ -51,6 +52,9 @@ export const ContractNFTPage: React.FC<NftOverviewPageProps> = ({
5152 const canCreateDelayedRevealBatch =
5253 ERC721Ext . isCreateDelayedRevealBatchSupported ( functionSelectors ) ;
5354
55+ const canBatchUpdateMetadata =
56+ ERC721Ext . isUpdateMetadataSupported ( functionSelectors ) ;
57+
5458 return (
5559 < div className = "flex flex-col gap-6" >
5660 < div className = "flex flex-col gap-3 xl:flex-row xl:items-center xl:justify-between" >
@@ -80,6 +84,13 @@ export const ContractNFTPage: React.FC<NftOverviewPageProps> = ({
8084 contract = { contract }
8185 />
8286 ) }
87+ { canBatchUpdateMetadata && (
88+ < BatchUpdateMetadataButton
89+ contract = { contract }
90+ canBatchUpdateMetadata = { canBatchUpdateMetadata }
91+ isErc721 = { isErc721 }
92+ />
93+ ) }
8394 </ div >
8495 </ div >
8596 { canShowSupplyCards && < SupplyCards contract = { contract } /> }
Original file line number Diff line number Diff line change 1+ import type { ThirdwebContract } from "thirdweb" ;
2+
3+ type Props = {
4+ contract : ThirdwebContract ;
5+ isErc721 : boolean ;
6+ canBatchUpdateMetadata : boolean ;
7+ } ;
8+ /**
9+ * For DropERC721 contracts only
10+ */
11+ export function BatchUpdateMetadataButton ( props : Props ) {
12+ if ( ! props . contract || ! props . canBatchUpdateMetadata || ! props . isErc721 ) {
13+ return null ;
14+ }
15+ return < > </ > ;
16+ }
You can’t perform that action at this time.
0 commit comments