• Discover
  • Partner with us
  • Chapters
  • Blog

Learn everything about Chiliz

Introduction
Chiliz Network and Its Use Cases
What Are Test Tokens and How to Utilize Them

What Are We Going to Build
Which Technologies Will Be Used
Implementing Frontend I - Creating ENV
Implementing Frontend II - Connect Wallet
Implementing Frontend III - Getting Token Balances
Implementing Frontend IV - Getting Token Metadata
Implementing Frontend V - HTML/CSS Walkthrough
Homework I - Submit your github repository link

What Are We Going to Build
Getting Chiliz Testnet Coins
Deploying NFT Marketplace Using Thirdweb
Implementing Frontend I - Creating ENV
Implementing Frontend II - Fetching Contract Info
Implementing Frontend III - Interacting with NFT Collection
Implementing Frontend IV - Interacting with Marketplace
Implementing Frontend V - List/Delist NFT on Marketplace
Implementing Frontend VI - Buy Listing
Homework II - Submit your github repository link

Submit Your Final Project

Displaying NFT Details and Integrating Marketplace Logic Using Thirdweb

In this video, we explore how to display individual NFT details and implement the logic required to manage marketplace listings using Thirdweb.

1. Routing to the NFT ID Page

When a user clicks on an NFT they own, they’re directed to a dynamic route ([id] page), where:

  • The NFT’s metadata and ownership info are displayed using a custom NFTDetails component.
  • Below this, logic is implemented to show one of two UI cards:
  • Sell NFT Card if the NFT is not listed.
  • Cancel Listing Card if the NFT is already listed.

2. Rendering NFT Details

We use the following approach:

  • Retrieve the NFT contract using getNFTContract.
  • Extract the NFT ID from the URL using Next.js routing.
  • Use Thirdweb's useNFT hook with the contract and ID to fetch the NFT’s metadata and ownership data.
  • Display this data using the NFTDetails UI component.
const { data: nft, isLoading: isNftLoading } = useNFT(contract, nftId);

If isNftLoading is true, we show a loading indicator. Otherwise, we render the NFT’s data.

3. Checking Marketplace Listing Status

To determine whether the NFT is listed:

  • Use getMarketplaceContract() to access the marketplace contract.
  • Call useWalletDirectListings with:
  • The marketplace contract
  • A filter range (e.g., start at 0, fetch 100 listings)

We then use Array.find() to locate a listing that matches the current NFT’s token ID.

const listedNft = directListings.find(item => item.asset.id === nftId);

If a listing exists, we extract:

  • listingId
  • price (converted from display value)
  • symbol (currency symbol)

These are stored in state variables to control UI behavior.

4. Managing UI Based on Listing Status

We use a conditional check:

  • If the NFT is listed:
  • Show the CancelListingCard component, passing:
  • listingId
  • price
  • symbol
  • If the NFT is not listed:
  • Show the SellNFTCard component with:
  • nftId
  • price input
  • An onUpdatePrice handler for setting a new price

This separation ensures a dynamic and context-aware UI experience.

5. Summary and Next Steps

With the NFT detail page now complete, users can:

  • View full NFT metadata
  • See if their NFT is listed for sale
  • Access contextually appropriate marketplace actions
Previous
Next

Lesson discussion

Swap insights and ask questions about “Learn everything about Chiliz”.

Enroll to participate
Start the course to unlock the discussion. Enrolling helps us keep conversations relevant to learners.
WebsiteDiscoverPartner with UsBlogEvents
Discover
CoursesCircleRustSoliditySolanaWeb3 FundamentalsBlockchain Basics
CompanyAbout UsBrand GuidelineFAQsTerms of UsePrivacy PolicyGDPR NoticeCookies
Don't miss any update!

Disclaimer: The information, programs, and events provided on https://risein.com is strictly for upskilling and networking purposes related to the technical infrastructure of blockchain platforms. We do not provide financial or investment advice, nor do we make any representations regarding the value, profitability, or future price of any blockchain or cryptocurrency. Users are encouraged to conduct their own research and consult with licensed financial professionals before engaging in any investment activities. https://risein.com disclaims any responsibility for financial decisions made by users based on the information provided here.

© 2026 Rise In, All rights reserved