Using the TheBadge-UI-Library
Available components
1) First you have to install the library:
yarn add thebadge-ui-library2) Then import CSS files with styles in your _app.tx file:
import 'node_modules/thebadge-ui-library/dist/index.css'3) Now you can use the component by providing to it the badge metadata
Example with BadgePreviewV2:
{
"badge": {
"id": "0x51fd663a6b85383c96e229ec12c0882eaa9886fe-8",
"evidenceMetadataUrl": "ipfs://QmYVn1MGonZ6n1VKN8M7fEeGtfLeyjGSztFDEaTHqERcgD", -> contains the imageUrl
"reviewDueDate": "1680277596",
"status": "InReview",
"isChallenged": false,
"receiver": {
"id": "0x51fd663a6b85383c96e229ec12c0882eaa9886fe"
},
"badgeType": {
"id": "8",
"metadataURL": "ipfs://QmaMdeyvZbgo2v5rKxopdZ6CFuJd95V2Lp3hmoWYYer4jJ", -> contains the badgeTypeMetadata
"validFor": "0",
"badgesMintedAmount": "0"
}
}
}
Last updated