added the featured events for the home page as well.

This commit is contained in:
NoobDeveloper412 2024-09-16 19:47:42 +05:00
parent 9a8d9299f0
commit ce2663e1a2
2 changed files with 11 additions and 1 deletions

View file

@ -55,6 +55,7 @@ for (const e of upcomingEvents) {
} }
} }
--- ---

View file

@ -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)
) { ) {