Skip to content

Commit

Permalink
πŸš‘οΈ Fix control bar for NFT Book (#1457)
Browse files Browse the repository at this point in the history
* πŸ› Fix control bar price for NFT Book

* πŸ› Fix control bar collect button functionality for NFT Book
  • Loading branch information
nwingt authored Dec 12, 2023
1 parent 6d95dbe commit dfe4c6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/mixins/nft.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,8 @@ export default {
: '-';
},
controlBarPriceLabel() {
if (this.nftIsNFTBook && this.nftBookAvailablePriceLabel) {
// Do not show the second-hand price if there is stock left
return '';
if (this.nftIsNFTBook) {
return this.nftBookAvailablePriceLabel;
}
return this.NFTPrice && formatNumberWithUSD(this.NFTPrice);
},
Expand Down
6 changes: 6 additions & 0 deletions src/pages/nft/class/_classId/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,12 @@ export default {
},
async handleCollect() {
logTrackerEvent(this, 'NFT', 'NFTCollect(DetailsPage)', this.classId, 1);
if (this.nftIsNFTBook) {
await this.handleCollectFromEdition(this.defaultSelectedValue);
return;
}
try {
this.isCollecting = true;
await this.collectNFT();
Expand Down

0 comments on commit dfe4c6b

Please sign in to comment.