From b9865cbf3dd0068cffec46252f9702e255f333b9 Mon Sep 17 00:00:00 2001 From: Angelo CG Date: Thu, 13 Oct 2022 13:29:38 -0600 Subject: [PATCH] fix(pages): don't show inactive members --- src/components/Voters/Body/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Voters/Body/index.tsx b/src/components/Voters/Body/index.tsx index b2482cf..8f876a1 100644 --- a/src/components/Voters/Body/index.tsx +++ b/src/components/Voters/Body/index.tsx @@ -27,11 +27,15 @@ const Body: React.FC = ({ searchValue }) => { setLoadingData(true) const members = await smartProxyUtil.getEdenMembers( nextKey === '' ? undefined : nextKey, - 20 + 40 ) + if (members) { + const activeMembers = members?.rows?.filter( + member => member[1]?.status === 1 + ) const electionRankSize = await genesisEdenUtil.getRanks() - const membersCompleteDataPromise = members?.rows?.map(async member => { + const membersCompleteDataPromise = activeMembers.map(async member => { const { rows } = await smartProxyUtil.getVotes( member[1]?.account, member[1]?.account,