Skip to content

Commit

Permalink
update to averageAPY add make validator name clickable (MystenLabs#7467)
Browse files Browse the repository at this point in the history
Make the validator name clickable and round the average APY. Maybe we
have to update `InternalLink` component to include text and an option to
disable mono?
  • Loading branch information
Jibz1 authored Jan 24, 2023
1 parent d38bf93 commit 2609100
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ const validatorsTable = (
const validators = processValidators(
validatorsData.validators.fields.active_validators,
totalStake
).sort((a, b) => (a.name > b.name ? 1 : -1));
).sort((a, b) =>
a.name.localeCompare(b.name, 'en', {
sensitivity: 'base',
numeric: true,
})
);

const validatorsItems = limit ? validators.splice(0, limit) : validators;

Expand All @@ -68,9 +73,10 @@ const validatorsTable = (
circle
/>
)}
<Text variant="bodySmall/medium" color="steel-darker">

<Link to={`/validator/${encodeURIComponent(address)}`}>
{name}
</Text>
</Link>
</div>
),
stake: <StakeColumn stake={stake} />,
Expand Down

0 comments on commit 2609100

Please sign in to comment.