useListing() function
This feature is currently in beta and may change based on feedback that we receive.
Use this to get a specific listing from the marketplace.
Example
const { data: listing, isLoading, error } = useListing(<YourMarketplaceContractInstance>, <listingId>);
Signature:
export declare function useListing(
contract: RequiredParam<Marketplace>,
listingId: RequiredParam<BigNumberish>,
): import("@tanstack/react-query").UseQueryResult<
| import("@thirdweb-dev/sdk/dist/browser").AuctionListing
| import("@thirdweb-dev/sdk/dist/browser").DirectListing,
unknown
>;
Parameters
Parameter | Type | Description |
---|---|---|
contract | RequiredParam<Marketplace> | an instance of a marketplace contract |
listingId | RequiredParam<BigNumberish> | the listing id to check |
Returns:
import("@tanstack/react-query").UseQueryResult<import("@thirdweb-dev/sdk/dist/browser").AuctionListing | import("@thirdweb-dev/sdk/dist/browser").DirectListing, unknown>
a response object that includes an array of listings