useClaimIneligibilityReasons
Hook for fetching the reasons a wallet is not eligible to claim tokens from a drop, if any.
Available for contracts that implement the claim conditions interface; such as NFT Drop, Edition Drop, and Token Drop.
import { useClaimIneligibilityReasons } from "@thirdweb-dev/react";
const { data, isLoading, error } = useClaimIneligibilityReasons(contract, {
walletAddress: "{{wallet_address}}",
quantity: 1,
});
Usage
Provide your Drop contract as the argument.
import { useClaimIneligibilityReasons, useContract } from "@thirdweb-dev/react";
// Your smart contract address
const contractAddress = "{{contract_address}}";
function App() {
const { contract } = useContract(contractAddress);
const { data, isLoading, error } = useClaimIneligibilityReasons(contract, {
walletAddress: "{{wallet_address}}", // Use useAddress hook to get the user's wallet address
quantity: 1, // Quantity to check eligibility for
});
}