From 4377f0e22fd7eaf489e560d87353a3ccf428acdc Mon Sep 17 00:00:00 2001 From: Akinshola <114211385+Akshola00@users.noreply.github.com> Date: Fri, 25 Oct 2024 10:12:42 +0100 Subject: [PATCH] fix boost quest progress display (#902) * refac: changed the wording to show the correct info * chore: removed debugging * refac: correct boosts to relevantBoosts --- .../pages/home/questAndCollectionTabs.tsx | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/components/pages/home/questAndCollectionTabs.tsx b/components/pages/home/questAndCollectionTabs.tsx index 7ef2a271..25c2fd74 100644 --- a/components/pages/home/questAndCollectionTabs.tsx +++ b/components/pages/home/questAndCollectionTabs.tsx @@ -183,27 +183,28 @@ const QuestAndCollectionTabs: FunctionComponent< fontFamily: "Sora", minHeight: "32px", }} - label={`Collections (${filteredCategories.length + (boosts ? 1 : 0) - })`} + label={`Collections (${ + filteredCategories.length + (boosts ? 1 : 0) + })`} {...a11yProps(1)} /> - {address && (displayBoosts.length > 0 ? ( - - ) : null - )} + {address && + (displayBoosts.length > 0 ? ( + + ) : null)} @@ -245,14 +246,15 @@ const QuestAndCollectionTabs: FunctionComponent< type={TEXT_TYPE.BODY_DEFAULT} className={`${styles.categoryInfosText} text-gray-200 normal-case`} > - {completedBoostNumber === boosts.length ? ( + {completedBoostNumber === relevantBoosts.length ? ( - All boosts done + All quests were done{" "} ) : ( - `${completedBoostNumber}/${relevantBoosts.length - } Boost${boosts.length > 1 ? "s" : ""} done` + `${completedBoostNumber}/${ + relevantBoosts.length + } Boost${relevantBoosts.length > 1 ? "s" : ""} done` )}