From 5021fa63d6f3a48b376419288c8ca1edd6f750ec Mon Sep 17 00:00:00 2001 From: Roger Gutierrez Date: Wed, 20 Nov 2024 12:08:52 -0600 Subject: [PATCH] fix: level replaced with level name --- src/components/MyKiva/BadgeTile.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/MyKiva/BadgeTile.vue b/src/components/MyKiva/BadgeTile.vue index 6d4d23d58e..e12539f86c 100644 --- a/src/components/MyKiva/BadgeTile.vue +++ b/src/components/MyKiva/BadgeTile.vue @@ -104,11 +104,14 @@ const selectedTier = computed(() => { const tiers = []; tieredBadges.value.forEach(badge => { const tier = badge.achievementData?.tiers?.find(t => !t.completedDate); + const tierBadgeData = getTierBadgeDataByLevel(badge, tier.level); + const levelName = tierBadgeData?.contentfulData?.levelName ?? ''; if (tier) { tiers.push({ badge, totalProgressToAchievement: badge.achievementData.totalProgressToAchievement, tier, + levelName, }); } }); @@ -133,7 +136,7 @@ const selectedTier = computed(() => { const badgeName = computed(() => selectedTier?.value?.badge?.challengeName ?? ''); const tileTitle = computed(() => { - const tierLevel = selectedTier?.value?.tier?.level ?? ''; + const tierLevel = selectedTier?.value?.levelName ?? ''; return `${badgeName.value} (level ${tierLevel})`; });