useResetClaimConditions

Hook for resetting the claim conditions on a drop contract.

Available to use on contracts that implement ERC721ClaimableWithConditions , ERC1155ClaimableWithConditions or ERC20ClaimableWithConditions .

Example

import {
useContract,
useResetClaimConditions,
Web3Button,
} from "@thirdweb-dev/react";
function App() {
// Contract must be a drop contract that implements claim conditions
const { contract } = useContract(contractAddress);
const {
mutateAsync: resetClaimConditions,
isLoading,
error,
} = useResetClaimConditions(contract);
return (
<Web3Button
contractAddress={contractAddress}
action={() => resetClaimConditions()}
>
Reset Claim Conditions
</Web3Button>
);
}
function useResetClaimConditions(
contract: RequiredParam<DropContract>,
tokenId?: BigNumberish,
): UseMutationResult<Omit<{}, "data">, unknown, void, unknown>;

Parameters

Instance of a DropContract

Type

let contract: RequiredParam<DropContract>;

For ERC1155 NFTs, provide the token ID of the NFT as the second argument to the hook.

Type

let tokenId: BigNumberish;

Returns

let returnType: UseMutationResult<
Omit<{}, "data">,
unknown,
void,
unknown
>;