Skip to content

Commit

Permalink
refac - modify 'To claim' tab logic (#798)
Browse files Browse the repository at this point in the history
* refactor To claim tab

* refactor To claim tab
  • Loading branch information
Iwueseiter authored Aug 5, 2024
1 parent 35f2be8 commit 94cc911
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app/[addressOrDomain]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ export default function Page({ params }: AddressOrDomainProps) {
label={`Completed (${completedQuests.length})`}
{...a11yProps(0)}
/>
{claimableQuests.length > 0 ? (
<Tab
disableRipple
sx={{
Expand All @@ -362,11 +363,10 @@ export default function Page({ params }: AddressOrDomainProps) {
fontFamily: "Sora",
minHeight: "32px",
}}
label={`To claim (${
claimableQuests ? claimableQuests.length : 0
})`}
label={`To claim (${claimableQuests})`}
{...a11yProps(1)}
/>
) : null}
</Tabs>
</div>
<CustomTabPanel value={tabIndex} index={0}>
Expand Down
10 changes: 6 additions & 4 deletions components/pages/home/questAndCollectionTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ const QuestAndCollectionTabs: FunctionComponent<
{...a11yProps(1)}
/>
{address && (
<>
{displayBoosts.length > 0 ? (
<Tab
disableRipple
sx={{
Expand All @@ -174,11 +176,11 @@ const QuestAndCollectionTabs: FunctionComponent<
fontFamily: "Sora",
minHeight: "32px",
}}
label={`To claim (${
displayBoosts ? displayBoosts.length : 0
})`}
label={`To claim (${displayBoosts.length})`}
{...a11yProps(2)}
/>
/>
) : null }
</>
)}
</Tabs>
</div>
Expand Down

0 comments on commit 94cc911

Please sign in to comment.