Skip to content

Commit

Permalink
Fixed data mutation on YPP landing page (#5115)
Browse files Browse the repository at this point in the history
* fixed data mutation on YPP landing page

* Update packages/atlas/src/views/global/YppLandingView/sections/YppRewardSection.tsx

Co-authored-by: Theophile Sandoz <[email protected]>

---------

Co-authored-by: Theophile Sandoz <[email protected]>
  • Loading branch information
attemka and thesan authored Oct 31, 2023
1 parent 42e50a6 commit ebc7f2e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ export const YppRewardSection: FC = () => {
</CenteredLayoutGrid>
<LayoutGrid>
<TierCardWrapper colSpan={{ base: 12, sm: 10, md: 12, lg: 10 }} colStart={{ sm: 2, md: 1, lg: 2 }}>
{[...tiers].map((tier) => {
tier.rewards[tier.rewards.length - 1] = getTierRewards('diamond')?.referral || 0
return <TierCard key={tier.tier} {...tier} />
{tiers.map((tier) => {
const modifiedRewards = [...tier.rewards.slice(0, -1), getTierRewards('diamond')?.referral || 0]
return <TierCard key={tier.tier} {...tier} rewards={modifiedRewards} />
})}
</TierCardWrapper>
<FlexGridItem
Expand Down

0 comments on commit ebc7f2e

Please sign in to comment.