Skip to main content

ThirdwebNftMedia variable

This feature is currently in beta and may change based on feedback that we receive.

Example

import { ThirdwebNftMedia, useNFTCollection, useNFT } from "@thirdweb-dev/react";
export default function NFTCollectionRender() {
const contract = useNFTCollection(<your-contract-address>);
const { data: nft, isLoading } = useNFT(contract, 0);

return (
<div>
{!isLoading && nft ? (
<ThirdwebNftMedia metadata={nft.metadata} />
) : (
<p>Loading...</p>
)}
</div>
);
}

Use this to get the primary sales recipient of your

Signature:

ThirdwebNftMedia: React.ForwardRefExoticComponent<
ThirdwebNftMediaProps & React.RefAttributes<HTMLMediaElement>
>;