Skip to content

Commit

Permalink
Update Validator page
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotkk committed Nov 12, 2024
1 parent 076d4d7 commit 58b99c7
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/pages/Validator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,23 +145,22 @@ export default function Validator(props: {
<Collapse in={props.address === undefined}>
<ConnectWallet tile className={cls(cmn.flexg)} />
</Collapse>
{props.validator !== undefined ? (
{props.address ? (props.validator !== undefined ? (
<div>
<ValidatorInfo validator={props.validator} />
<DelegationTotals delegations={props.delegations} className={cls(cmn.mtop10)} />
</div>
) : (
<div>
<PeopleRoundedIcon
className={cls(cmn.pSec, styles.chainIconlg, cmn.fullWidth, cmn.mtop20)}
/>
<h3 className={cls(cmn.p, cmn.p700, cmn.pSec, cmn.pCent, cmn.mbott20)}>
Validator doesn't exist
</h3>
</div>
)}
) : (<div>
<PeopleRoundedIcon
className={cls(cmn.pSec, styles.chainIconlg, cmn.fullWidth, cmn.mtop20)}
/>
<h3 className={cls(cmn.p, cmn.p700, cmn.pSec, cmn.pCent, cmn.mbott20)}>
Validator doesn't exist
</h3>
</div>)) : <div></div>
}
</SkPaper>
{props.validator !== undefined &&
{props.validator &&
<SkPaper gray className={cls(cmn.mtop20)}>
<Headline
size="small"
Expand Down Expand Up @@ -190,7 +189,7 @@ export default function Validator(props: {
}
/>
</SkPaper>}
{props.validator !== undefined && <SkPaper gray className={cls(cmn.mtop20)}>
{props.validator && <SkPaper gray className={cls(cmn.mtop20)}>
<div>
<div className={cls(cmn.flex, cmn.flexcv, cmn.mbott10)}>
<Headline
Expand Down

0 comments on commit 58b99c7

Please sign in to comment.