mirror of
https://github.com/web3privacy/web
synced 2024-10-15 18:26:27 +02:00
added the featured events for the home page as well.
This commit is contained in:
parent
9a8d9299f0
commit
ce2663e1a2
2 changed files with 11 additions and 1 deletions
|
@ -55,6 +55,7 @@ for (const e of upcomingEvents) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,13 +25,22 @@ for (const ev of events) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const allowedFeaturedTypes = [
|
||||||
|
"summit",
|
||||||
|
"meetup",
|
||||||
|
"online-summit",
|
||||||
|
"congress",
|
||||||
|
"privacy-corner",
|
||||||
|
"meta-hackathons",
|
||||||
|
];
|
||||||
|
|
||||||
const featuredEvents = [];
|
const featuredEvents = [];
|
||||||
for (const e of upcomingEvents) {
|
for (const e of upcomingEvents) {
|
||||||
if (featuredEvents.length > 2) {
|
if (featuredEvents.length > 2) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
["summit", "meetup", "online-summit"].includes(e.type) &&
|
allowedFeaturedTypes.includes(e.type) &&
|
||||||
e.links?.rsvp &&
|
e.links?.rsvp &&
|
||||||
!featuredEvents.find((ex) => ex.type === e.type)
|
!featuredEvents.find((ex) => ex.type === e.type)
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in a new issue