Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix membership list #1107

Open
wants to merge 41 commits into
base: content
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5bb57cb
CORE-4730 new section (#1026)
ekachxaidze98 Nov 28, 2023
09bee7f
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Nov 28, 2023
f8322dc
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Nov 30, 2023
c46af27
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Nov 30, 2023
9742cbc
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Nov 30, 2023
1ee51f1
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Dec 5, 2023
abdcae5
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Dec 14, 2023
e2edd91
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Dec 14, 2023
692f1f8
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Dec 18, 2023
20c92b2
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Dec 18, 2023
ee58367
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Dec 19, 2023
ba8a695
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Dec 19, 2023
d10eeac
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Dec 20, 2023
88df190
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Dec 22, 2023
7638d34
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 4, 2024
c74343a
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 11, 2024
a6703e7
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 12, 2024
3c07237
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 12, 2024
36993aa
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 16, 2024
29ff836
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 17, 2024
0b7bce8
Core 4784 UI docs page (#1075)
ekachxaidze98 Jan 18, 2024
76209f3
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 18, 2024
86197a9
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 18, 2024
e2f3ce8
CORE-4792: add benefited section (#1077)
ekachxaidze98 Jan 18, 2024
f98c548
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 18, 2024
1fd52cf
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 18, 2024
23153d2
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 22, 2024
1b2d340
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 22, 2024
647ecd9
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 23, 2024
20d6f71
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 23, 2024
eec6e70
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 23, 2024
3eeafee
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 24, 2024
f8b56bd
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 24, 2024
ea64064
bold issue (#1093)
ekachxaidze98 Jan 24, 2024
0b93f7b
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Jan 24, 2024
e230c79
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Feb 5, 2024
45157c7
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Feb 5, 2024
f540c11
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Feb 6, 2024
359c110
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Feb 22, 2024
478e9b5
Merge remote-tracking branch 'origin/content' into content
ekachxaidze98 Mar 1, 2024
6689e8e
CORE: exclud ids
ekachxaidze98 Mar 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions templates/governance/supporters/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,26 @@ const Card = ({ plan }) => (
</article>
)

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) =>
Expand Down Expand Up @@ -168,14 +176,17 @@ const GovernanceSupportersPageTemplate = ({ members, page }) => {
<Table.Row className={styles.paginationRow}>
<Table.Cell colSpan={2}>
<p className={styles.paginationText}>
Showing 1 - {Math.min(displayedItems, maxItems)}
Showing 1 -{' '}
{Math.min(displayedItems, filteredMembers.length)}
</p>
<Button
onClick={() =>
setDisplayedItems((prevCount) => prevCount + 10)
setDisplayedItems((prevCount) =>
Math.min(prevCount + 10, filteredMembers.length)
)
}
variant="outlined"
disabled={displayedItems >= maxItems}
disabled={displayedItems >= filteredMembers.length}
>
Show More
</Button>
Expand Down
Loading