fix: flickering (#2445)

* fix: flickering

* Update apps/token/src/routes/staking/home/validator-tables/validator-tables.tsx
This commit is contained in:
Dexter Edwards 2022-12-22 10:49:26 +00:00 committed by GitHub
parent c2595b533d
commit f4fa0bd25a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -122,8 +122,7 @@ export const ConsensusValidatorsTable = ({
const gridRef = useRef<AgGridReact | null>(null);
const nodes = useMemo(() => {
if (!data) return [];
if (!data || !previousEpochData) return [];
const canonisedNodes = data
.sort((a, b) => {
const aVotingPower = new BigNumber(a.rankingScore.votingPower);

View File

@ -59,7 +59,6 @@ export const ValidatorTables = ({
case Schema.ValidatorStatus.VALIDATOR_NODE_STATUS_PENDING:
acc.pendingValidators.push(validator);
}
return acc;
},
{
@ -95,7 +94,6 @@ export const ValidatorTables = ({
2
).toString();
}
return (
<div data-testid="validator-tables">
{consensusValidators.length > 0 && (