mirror of
https://github.com/web3privacy/web
synced 2024-10-15 18:26:27 +02:00
Fixed the order for the coreContributors.
This commit is contained in:
parent
27c03e1f9f
commit
cf2b728cfc
1 changed files with 21 additions and 6 deletions
|
@ -3,13 +3,27 @@ import { parseAndWrapCaptions } from "../../utils/captionParser";
|
|||
|
||||
const { people, team, core, contributors } = Astro.props;
|
||||
|
||||
// Filter based on the `core` parameter
|
||||
const members = core ? people.filter((p) => {
|
||||
return team.includes(p.id)
|
||||
}).filter((p) => p.imageUrl) : team;
|
||||
const coreContributorsOrder = [
|
||||
'mykola-siusko',
|
||||
'pg',
|
||||
'michael-parenti',
|
||||
'coinmandeer',
|
||||
'robert',
|
||||
'cat',
|
||||
'odd',
|
||||
'mf'
|
||||
];
|
||||
|
||||
// Filter based on the `core` parameter
|
||||
const members = core
|
||||
? people.filter((p) => team.includes(p.id)).filter((p) => p.imageUrl)
|
||||
: team;
|
||||
|
||||
// Filter and sort `filteredPeople` based on `coreContributorsOrder`
|
||||
const filteredPeople = members.filter((p) => p.imageUrl).sort((a, b) => {
|
||||
return coreContributorsOrder.indexOf(a.id) - coreContributorsOrder.indexOf(b.id);
|
||||
});
|
||||
|
||||
// const filteredPeople = members.filter((p) => p.imageUrl).slice(0, 12);
|
||||
const filteredPeople = members.filter((p) => p.imageUrl);
|
||||
|
||||
function personLink(person) {
|
||||
if (person.refs?.twitter) {
|
||||
|
@ -32,6 +46,7 @@ function personLink(person) {
|
|||
}
|
||||
---
|
||||
|
||||
|
||||
<div
|
||||
class="grid grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 place-items-start"
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue