From 5b83a36167bbff59f13c05441e3cb071843eb8e5 Mon Sep 17 00:00:00 2001 From: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:02:00 +0400 Subject: [PATCH] CORE: exclude members by id (#1108) (#1109) --- templates/governance/supporters/index.jsx | 25 ++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/templates/governance/supporters/index.jsx b/templates/governance/supporters/index.jsx index 11eb304a..dfee8afb 100644 --- a/templates/governance/supporters/index.jsx +++ b/templates/governance/supporters/index.jsx @@ -26,18 +26,26 @@ const Card = ({ plan }) => ( ) +const excludedIds = [ + 3463, 183, 2145, 1248, 660, 222, 14373, 3559, 21117, 292, 14567, 2812, 196, + 3581, 197, 12800, 14335, 1249, 2313, 21853, 15201, 1012, 158, +] + const GovernanceSupportersPageTemplate = ({ members, page }) => { const [searchValue, setSearchValue] = useState('') - const [displayedItems, setDisplayedItems] = useState(50) - const maxItems = members.length + const [displayedItems, setDisplayedItems] = useState(30) const handleSearch = (event) => { const { value } = event.target setSearchValue(value) } - const filteredMembers = members.filter((member) => - member.organisation_name.toLowerCase().includes(searchValue.toLowerCase()) + const filteredMembers = members.filter( + (member) => + member.organisation_name + .toLowerCase() + .includes(searchValue.toLowerCase()) && + !excludedIds.includes(member.repo_id) ) const sortedMembers = [...filteredMembers].sort((a, b) => @@ -168,14 +176,17 @@ const GovernanceSupportersPageTemplate = ({ members, page }) => {
- Showing 1 - {Math.min(displayedItems, maxItems)} + Showing 1 -{' '} + {Math.min(displayedItems, filteredMembers.length)}