diff --git a/components/BookshelfItem.vue b/components/BookshelfItem.vue index b8120bbb..733296e4 100644 --- a/components/BookshelfItem.vue +++ b/components/BookshelfItem.vue @@ -2,14 +2,14 @@
  • @@ -103,28 +103,6 @@ >{{ bookInfo.authorName }} - - -
    - - - - - - -
  • @@ -148,14 +126,6 @@ const props = defineProps({ type: Boolean, default: false, }, - stakedAmount: { - type: Number, - default: 0, - }, - pendingRewards: { - type: Number, - default: 0, - }, isOwned: { type: Boolean, default: true, @@ -184,8 +154,6 @@ const progressPercentage = computed(() => Math.round(props.progress * 100)) const isDesktopScreen = useDesktopScreen() -const hasStakes = computed(() => props.stakedAmount > 0) - const menuItems = computed(() => { const genericItems: DropdownMenuItem[] = [] const readerItems: DropdownMenuItem[] = [] diff --git a/components/BookstoreItem.vue b/components/BookstoreItem.vue index 50fa3a26..5ad6b324 100644 --- a/components/BookstoreItem.vue +++ b/components/BookstoreItem.vue @@ -49,32 +49,15 @@ /> - -
    - - - - - - -
    + + + #{{ likeRank }} + @@ -108,11 +91,7 @@ const props = defineProps({ type: String, default: '', }, - totalStaked: { - type: Number, - default: 0, - }, - stakerCount: { + likeRank: { type: Number, default: 0, }, diff --git a/composables/use-nft-class-staking-data.ts b/composables/use-nft-class-staking-data.ts index 482c076f..6f1e9d5a 100644 --- a/composables/use-nft-class-staking-data.ts +++ b/composables/use-nft-class-staking-data.ts @@ -42,6 +42,10 @@ export function useNFTClassStakingData(nftClassId: ComputedRef) { return stakingStore.getNumberOfStakersCached(nftClassId.value) }) + const stakingRank = computed(() => { + return stakingStore.getStakingRankCached(nftClassId.value) + }) + // Load staking data from blockchain async function loadStakingData() { try { @@ -124,6 +128,7 @@ export function useNFTClassStakingData(nftClassId: ComputedRef) { pendingRewards, isClaimingRewards, numberOfStakers, + stakingRank, // Computed formattedTotalStake, formattedUserStake, diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 07b04cb5..c1c509b8 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -687,6 +687,7 @@ "staking_explore_total_staked": "Staked", "staking_info_tab_staking_info": "Staking", "staking_learn_more": "Learn more about Staking", + "staking_like_rank": "LikeRank", "staking_of_total": "{percentage}% of total", "staking_pending_rewards": "Pending rewards", "staking_stake_button": "Stake", diff --git a/i18n/locales/zh-Hant.json b/i18n/locales/zh-Hant.json index 69bafc3f..fadff93f 100644 --- a/i18n/locales/zh-Hant.json +++ b/i18n/locales/zh-Hant.json @@ -687,6 +687,7 @@ "staking_explore_total_staked": "應援指數", "staking_info_tab_staking_info": "應援指數", "staking_learn_more": "甚麼是應援?", + "staking_like_rank": "LikeRank", "staking_of_total": "佔比 {percentage}%", "staking_pending_rewards": "待領收益", "staking_stake_button": "質押", diff --git a/pages/shelf/[[walletAddress]].vue b/pages/shelf/[[walletAddress]].vue index 70387da4..9302dc2d 100644 --- a/pages/shelf/[[walletAddress]].vue +++ b/pages/shelf/[[walletAddress]].vue @@ -128,8 +128,6 @@ :class="getGridItemClassesByIndex(index)" :nft-class-id="item.nftClassId" :nft-ids="item.nftIds" - :staked-amount="item.stakedAmount" - :pending-rewards="item.pendingRewards" :is-owned="item.isOwned" :progress="item.progress" :lazy="index >= columnMax" diff --git a/pages/store/[nftClassId]/index.vue b/pages/store/[nftClassId]/index.vue index f270bfe3..20817096 100644 --- a/pages/store/[nftClassId]/index.vue +++ b/pages/store/[nftClassId]/index.vue @@ -276,6 +276,20 @@ /> + +
    +
    + #{{ stakingRank }} +
    +
    +
    +