Skip to content

Commit

Permalink
feat: level added to badge tile
Browse files Browse the repository at this point in the history
  • Loading branch information
roger-in-kiva committed Nov 20, 2024
1 parent 47ba1b0 commit d06e8ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/MyKiva/BadgeTile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</BadgeContainer>
<div>
<p class="tw-font-medium">
{{ tierData.tierName }}
{{ tileTitle }}
</p>
<p class="tw-text-small -tw-mt-0.5">
{{ tierCaption }}
Expand Down Expand Up @@ -131,6 +131,12 @@ const selectedTier = computed(() => {
});
const badgeName = computed(() => selectedTier?.value?.badge?.challengeName ?? '');
const tileTitle = computed(() => {
const tierLevel = selectedTier?.value?.tier?.level ?? '';
return `${badgeName.value} (level ${tierLevel})`;
});
const tierCaption = computed(() => {
const progress = selectedTier?.value?.totalProgressToAchievement ?? '';
const target = selectedTier?.value?.tier?.target ?? '';
Expand Down

0 comments on commit d06e8ea

Please sign in to comment.