useDirectListingsCount

Hook to get the total number of direct listings on a Marketplace V3 contract.

This hook is only for Marketplace V3 contracts.

For Marketplace contracts, use useListingsCount instead.

Example

import {
useDirectListingsCount,
useContract,
} from "@thirdweb-dev/react";
function App() {
const { contract } = useContract(contractAddress, "marketplace-v3");
const {
data: listingsCount,
isLoading,
error,
} = useDirectListingsCount(contract);
}

Parameters

Returns

The hook's data property, once loaded, is a BigNumber containing the number of direct listings on the Marketplace V3 contract.