Fix democracy icon location (#6077)

This commit is contained in:
Jaco 2021-09-06 12:52:51 +03:00 committed by GitHub
parent d8ba6e3630
commit 302df65239
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 11 deletions

View File

@ -139,8 +139,8 @@ function calcBonded (stakingInfo?: DeriveStakingAccount, bonded?: boolean | BN[]
if (Array.isArray(bonded)) {
other = bonded
.filter((_, index): boolean => index !== 0)
.filter((value): boolean => value.gtn(0));
.filter((_, index) => index !== 0)
.filter((value) => value.gt(BN_ZERO));
own = bonded[0];
} else if (stakingInfo && stakingInfo.stakingLedger && stakingInfo.stakingLedger.active && stakingInfo.accountId.eq(stakingInfo.stashId)) {

View File

@ -110,11 +110,15 @@ function DemocracyLocks ({ className = '', value }: Props): React.ReactElement<P
return (
<div className={className}>
<Icon
icon='clock'
tooltip={trigger}
<FormatBalance
labelPost={
<Icon
icon='clock'
tooltip={trigger}
/>
}
value={maxBalance}
/>
<FormatBalance value={maxBalance} />
<Tooltip
text={sorted.map(({ details, headers }, index): React.ReactNode => (
<div
@ -136,11 +140,6 @@ function DemocracyLocks ({ className = '', value }: Props): React.ReactElement<P
export default React.memo(styled(DemocracyLocks)`
white-space: nowrap;
.ui--Icon {
margin-left: 0;
margin-right: 0.25rem;
}
.ui--FormatBalance {
display: inline-block;
}