Skip to main content

useClaimedNFTSupply

Hook for retrieving the total supply of NFTs claimed from a {@link DropContract}.

import { useClaimedNFTSupply } from "@thirdweb-dev/react";

Usage

Provide your NFT drop contract as the argument.

import { useClaimedNFTSupply, useContract } from "@thirdweb-dev/react";

// Your smart contract address
const contractAddress = "{{contract_address}}";

function App() {
const { contract } = useContract(contractAddress);
const { data: claimedTokens, isLoading } = useClaimedNFTSupply(contract);

return (
<div>
<p>Claimed Tokens: {claimedTokens?.toString()}</p>
<p>Loading: {isLoading.toString()}</p>
</div>
);
}