Display NFTs
NFTs can be displayed using the components collected on the /nft/<id> page of the leaderboard template.
To display a list of NFTs, import the <RenderNftsList/> widget
import { RenderNftsList } from "components/widgets";The <RenderNftsList/> component takes the array nfts as a prop
function Component() {
return (
<>
<RenderNftsList nfts={nfts} />
</>
);
}The nfts here must be an array of objects with each NFT object following the format shown below.
const nfts = [
{
attention: // The attention(Views) that NFT has
balances: // The number of NFTs owner have
contentType: // The type of the NFT, such as image/png or video/mp4
createdAt: // NFT create date
description: // Description of NFT
id: // Id of NFT
locked: []
next: // Next NFT
owner: // The wallet address of the NFT's owner
prev: // Previous NFT
reward: // Number of KOII this NFT get
tags: // Tags this NFT have such as ['#art']
ticker: "KOINFT"
title: // Title of NFT
}
]
If you need help Fetching NFT Data, check out the previous section.
Customization
Configuring new views and new forms of Atomic content requires a thorough understanding of the tools at play. This section covers tips and instructions for quickly scaffolding new formats.
File Types
There are several supported mime types for the Leaderboard Template:
text/html ~ these will render as apps inside iframes (useful for dynamic content)
image/* ~ these will render as html <img> tags
video/* ~ these will render as iframes containing videos
View Controls
Each type of Atomic NFT has a different type of view:
Swap the content out
Show live counts for attention, title, description, etc.
Last updated
