Skip to content

Commit

Permalink
fix: align claim button with value
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor committed Mar 11, 2024
1 parent 125cfd8 commit d3443f0
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions src/features/staking/components/validator-delegation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,32 +95,34 @@ export default function ValidatorDelegation() {
<Heading8>Claimable Rewards (XION)</Heading8>
<div className="mb-[8px] mt-[12px] flex flex-row items-center gap-[8px]">
<div className="flex flex-col gap-[8px]">
{totalRewards && (
<Heading2 title={[totalRewards.amount, "XION"].join(" ")}>
{formatToSmallDisplay(
new BigNumber(totalRewards.amount),
minDisplayedXion,
)}
</Heading2>
)}
<div className="flex flex-row items-center gap-[12px]">
{totalRewards && (
<Heading2 title={[totalRewards.amount, "XION"].join(" ")}>
{formatToSmallDisplay(
new BigNumber(totalRewards.amount),
minDisplayedXion,
)}
</Heading2>
)}
{getCanClaimAnyRewards(staking.state) && (
<ButtonPill
onClick={() => {
staking.dispatch(
setModalOpened({
content: {
delegations: staking.state.delegations?.items || [],
},
type: "rewards",
}),
);
}}
>
Claim
</ButtonPill>
)}
</div>
<BodyMedium>{formatXionToUSD(totalRewards)}</BodyMedium>
</div>
{getCanClaimAnyRewards(staking.state) && (
<ButtonPill
onClick={() => {
staking.dispatch(
setModalOpened({
content: {
delegations: staking.state.delegations?.items || [],
},
type: "rewards",
}),
);
}}
>
Claim
</ButtonPill>
)}
</div>
<div className="absolute bottom-0 right-[20px] top-0">
<DivisorVertical />
Expand Down

0 comments on commit d3443f0

Please sign in to comment.