Skip to content

Commit

Permalink
percent to be burned
Browse files Browse the repository at this point in the history
  • Loading branch information
gluneau committed Feb 27, 2024
1 parent ef70de5 commit 8b3fc5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 7 additions & 0 deletions src/staking-v3/components/leaderboard/Tier.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<token-balance-native :balance="dailyReward?.toString() ?? '0'" />
</div>
</div>
<div v-if="percentToBeBurned" class="column--reward">
<div class="text--reward">{{ $t('stakingV3.burn') }}</div>
<div class="text--amount">{{ percentToBeBurned }}%</div>
</div>
</div>

<swiper class="swiper--tier" :navigation="true" :modules="modules">
Expand Down Expand Up @@ -90,6 +94,8 @@ export default defineComponent({
const itemsToShow = 10;
const itemsPerPage = 5;
const slicedDapps = computed<CombinedDappInfo[]>(() => props.dapps.slice(0, itemsToShow));
const spots = props.dapps.length;
const percentToBeBurned = Math.floor(100 * ((props.slots - spots) / props.slots));
const page1 = computed<CombinedDappInfo[]>(() => props.dapps.slice(0, itemsPerPage));
const page2 = computed<CombinedDappInfo[]>(() => props.dapps.slice(itemsPerPage, itemsToShow));
Expand All @@ -102,6 +108,7 @@ export default defineComponent({
itemsPerPage,
page1,
page2,
percentToBeBurned,
navigateDappPage,
};
},
Expand Down
5 changes: 1 addition & 4 deletions src/staking-v3/components/leaderboard/noEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<div>{{ $t('stakingV3.noEntry') }}</div>
</div>
<div class="amount">
<token-balance-native :balance="toBeBurned.toString() ?? '0'" />
{{ $t('stakingV3.burn') }}
</div>
</div>
Expand All @@ -19,9 +18,7 @@ import { defineComponent, PropType } from 'vue';
import TokenBalanceNative from 'src/components/common/TokenBalanceNative.vue';
export default defineComponent({
components: {
TokenBalanceNative,
},
components: {},
props: {
index: {
type: Number,
Expand Down

0 comments on commit 8b3fc5a

Please sign in to comment.