Skip to content

Commit

Permalink
fix boost quest progress display (#902)
Browse files Browse the repository at this point in the history
* refac: changed the wording to show the correct info

* chore: removed debugging

* refac: correct boosts to relevantBoosts
  • Loading branch information
Akshola00 authored Oct 25, 2024
1 parent 134b7be commit 4377f0e
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions components/pages/home/questAndCollectionTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? (
<Tab
disableRipple
sx={{
borderRadius: "10px",
padding: "0px 12px 0px 12px",
textTransform: "none",
fontWeight: "600",
fontSize: "12px",
fontFamily: "Sora",
minHeight: "32px",
}}
label={`To claim (${displayBoosts.length})`}
{...a11yProps(2)}
/>
) : null
)}
{address &&
(displayBoosts.length > 0 ? (
<Tab
disableRipple
sx={{
borderRadius: "10px",
padding: "0px 12px 0px 12px",
textTransform: "none",
fontWeight: "600",
fontSize: "12px",
fontFamily: "Sora",
minHeight: "32px",
}}
label={`To claim (${displayBoosts.length})`}
{...a11yProps(2)}
/>
) : null)}
</Tabs>
</div>
<CustomTabPanel value={tabIndex} index={0}>
Expand Down Expand Up @@ -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 ? (
<span className="flex">
<span className="mr-2">All boosts done</span>
<span className="mr-2">All quests were done</span>{" "}
<CheckIcon width="24" color="#6AFFAF" />
</span>
) : (
`${completedBoostNumber}/${relevantBoosts.length
} Boost${boosts.length > 1 ? "s" : ""} done`
`${completedBoostNumber}/${
relevantBoosts.length
} Boost${relevantBoosts.length > 1 ? "s" : ""} done`
)}
</Typography>
</div>
Expand Down

0 comments on commit 4377f0e

Please sign in to comment.