Skip to content

Commit

Permalink
feat: 💄 improve earn by stakers format
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideSegullo committed Jun 19, 2024
1 parent e619a01 commit 49eeee2
Showing 1 changed file with 29 additions and 33 deletions.
62 changes: 29 additions & 33 deletions src/views/ExchangeBillboards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,42 +50,38 @@ export const ExchangeBillboards: React.FC<ExchangeBillboardsProps> = () => {
labelKey: STRING_KEYS.EARNED_BY_STAKERS,
tagKey: STRING_KEYS._24H,
value: feesEarned,
type: OutputType.CompactFiat,
type: OutputType.Fiat,
linkLabelKey: STRING_KEYS.LEARN_MORE_ARROW,
link: `${chainTokenLabel}/${TokenRoute.StakingRewards}`,
slotLeft: '~',
},
].map(
({ key, labelKey, tagKey, value, fractionDigits, type, link, linkLabelKey, slotLeft }) => (
<$BillboardContainer key={key}>
<$BillboardStat>
<$BillboardTitle>
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
<label>{stringGetter({ key: labelKey })}</label>
<Tag>{stringGetter({ key: tagKey })}</Tag>
</$BillboardTitle>
<$Output
useGrouping
withBaseFont
fractionDigits={fractionDigits}
type={type}
value={value}
slotLeft={slotLeft}
/>
{link && linkLabelKey ? (
<$BillboardLink
href={link}
size={ButtonSize.Small}
type={ButtonType.Link}
action={ButtonAction.Navigation}
>
{stringGetter({ key: linkLabelKey })}
</$BillboardLink>
) : null}
</$BillboardStat>
</$BillboardContainer>
)
)}
].map(({ key, labelKey, tagKey, value, fractionDigits, type, link, linkLabelKey }) => (
<$BillboardContainer key={key}>
<$BillboardStat>
<$BillboardTitle>
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
<label>{stringGetter({ key: labelKey })}</label>
<Tag>{stringGetter({ key: tagKey })}</Tag>
</$BillboardTitle>
<$Output
useGrouping
withBaseFont
fractionDigits={fractionDigits}
type={type}
value={value}
/>
{link && linkLabelKey ? (
<$BillboardLink
href={link}
size={ButtonSize.Small}
type={ButtonType.Link}
action={ButtonAction.Navigation}
>
{stringGetter({ key: linkLabelKey })}
</$BillboardLink>
) : null}
</$BillboardStat>
</$BillboardContainer>
))}
</$MarketBillboardsWrapper>
);
};
Expand Down

0 comments on commit 49eeee2

Please sign in to comment.