Skip to content

Commit

Permalink
feat: dim text of expired nodes (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryenguyen7411 authored Nov 19, 2023
1 parent fa6114d commit 1f7b0df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/modules/scenes/Main/Metanodes/MetanodeList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export const MetanodeList = (props: Props) => {
<StatusIcon status={toggleStatusIconColor(node.status)} />

{isNoRequiredTooltip ? (
<TextNodeStatus variant="label">
<TextNodeStatus>
<FormattedMessage id={toggleStatusWord(node.status) as string} />
</TextNodeStatus>
) : (
Expand All @@ -140,7 +140,7 @@ export const MetanodeList = (props: Props) => {
}
targetHtmlTag="span"
>
<TextNodeStatus variant="label">
<TextNodeStatus>
<FormattedMessage id={toggleStatusWord(node.status) as string} />
</TextNodeStatus>
</TooltipStatus>
Expand All @@ -153,23 +153,22 @@ export const MetanodeList = (props: Props) => {
<TextRoom>{node.version}</TextRoom>
</SizeL>
<div>
<TextRoom>{bondAmount}</TextRoom>{' '}
<TextRoom variant="label">({lockedPortion}%)</TextRoom>
<TextRoom>{bondAmount}</TextRoom> <TextRoom>({lockedPortion}%)</TextRoom>
</div>
<ColumnExpiry>
<Column>
<TextNowrap>{expireTime}</TextNowrap>
<TextNowrap variant="label">({getDiffDays(expireTimestamp)})</TextNowrap>
<TextNowrap>({getDiffDays(expireTimestamp)})</TextNowrap>
</Column>
</ColumnExpiry>
<SizeL>
<BoxAddress>
<RowAddress>
<CurrencyColumn>
<CurrencyBox>
<TextRoom variant="label">{sbBTCRewardCurrency}</TextRoom>
<TextRoom>{sbBTCRewardCurrency}</TextRoom>
</CurrencyBox>
<TextRoom variant="label">:</TextRoom>
<TextRoom>:</TextRoom>
</CurrencyColumn>
<ColumnAddress>
<AddressP>{ethAddress}</AddressP>
Expand Down
4 changes: 4 additions & 0 deletions src/modules/scenes/Main/Metanodes/MetanodeList/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ export const Row = styled.div<BgProps>`
: props.bg === MayChurnIn
? 'rgba(143, 231, 217, 0.2)'
: !props.bg && props.theme.pulsar.color.bg.hover};
color: ${(props) =>
props.bg === InactiveBondExpired || props.bg === Unreachable
? props.theme.pulsar.color.text.placeholder
: props.theme.pulsar.color.text.normal};
display: grid;
align-items: center;
grid-template-columns: ${nodeListGridTemplateColumnsFrameMobile};
Expand Down

1 comment on commit 1f7b0df

@vercel
Copy link

@vercel vercel bot commented on 1f7b0df Nov 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.