diff --git a/src/pages/ValidatorManagement/ManagementTable/ManagementTable.tsx b/src/pages/ValidatorManagement/ManagementTable/ManagementTable.tsx index bdedf756..24db502b 100644 --- a/src/pages/ValidatorManagement/ManagementTable/ManagementTable.tsx +++ b/src/pages/ValidatorManagement/ManagementTable/ManagementTable.tsx @@ -58,7 +58,11 @@ const validators = [ }, ] -const ManagementTable = () => { +type ManagementTableProps = { + tab: string +} + +const ManagementTable = ({ tab }: ManagementTableProps) => { const [searchValue, setSearchValue] = useState('') const changeSearchValue = (value: string) => { @@ -155,59 +159,61 @@ const ManagementTable = () => { - {validators.map((validator, index) => ( - - - - - - - - - - {validator.balance} - - - - - {validator.income} - - - - - {validator.proposals} - - - - - {validator.attestations} - - - - - {validator.effectiveness} - - - - - {validator.deposits} - - - - - {validator.rank} - - - - - {validator.status} - - - - - - - ))} + {validators + .filter(validator => validator.status === tab) + .map((validator, index) => ( + + + + + + + + + + {validator.balance} + + + + + {validator.income} + + + + + {validator.proposals} + + + + + {validator.attestations} + + + + + {validator.effectiveness} + + + + + {validator.deposits} + + + + + {validator.rank} + + + + + {validator.status} + + + + + + + ))} diff --git a/src/pages/ValidatorManagement/ManagementTabs.tsx b/src/pages/ValidatorManagement/ManagementTabs.tsx index a5b0b06a..98121189 100644 --- a/src/pages/ValidatorManagement/ManagementTabs.tsx +++ b/src/pages/ValidatorManagement/ManagementTabs.tsx @@ -42,7 +42,7 @@ const ManagementTabs = () => { {VALIDATOR_TABS.map(tab => ( - + ))}