Skip to content

Commit f89ede2

Browse files
Feature: add community partner section (#85)
* fix(events): reorganize event section with upcoming first, add CFP/volunteer cards and dedicated route for events page * feat: add dedicated Community section with enhanced partners UI and logos * refactor: replace IIFE with filter method for event categorization --------- Signed-off-by: Siddharth Rajesh Jiyani <120766410+SiddharthJiyani@users.noreply.github.com> Co-authored-by: Priyankar Pal <88102392+priyankarpal@users.noreply.github.com>
1 parent 541674d commit f89ede2

File tree

12 files changed

+173
-21
lines changed

12 files changed

+173
-21
lines changed
33.6 KB
Loading

public/partners/hackspire.jpg

53.9 KB
Loading
10.7 KB
Loading

public/partners/reactplay.png

8.34 KB
Loading

src/app/[locale]/events/page.tsx

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,15 @@ import { events } from "@/base/data/dummy";
1313
export default function EventsPage() {
1414
const t = useTranslations("Events");
1515

16-
const { upcomingEvents, pastEvents } = (() => {
17-
const upcoming: typeof events = [];
18-
const past: typeof events = [];
16+
const upcomingEvents = events.filter((event) => {
17+
const status = getEventStatus(event.startDateTime, event.endDateTime);
18+
return status === EVENT_STATUS.UPCOMING || status === EVENT_STATUS.ONGOING;
19+
});
1920

20-
events.forEach((event) => {
21-
const dynamicStatus = getEventStatus(event.startDateTime, event.endDateTime);
22-
if (dynamicStatus === EVENT_STATUS.UPCOMING || dynamicStatus === EVENT_STATUS.ONGOING) {
23-
upcoming.push(event);
24-
} else {
25-
past.push(event);
26-
}
27-
});
28-
29-
return {
30-
upcomingEvents: upcoming,
31-
pastEvents: past,
32-
};
33-
})();
21+
const pastEvents = events.filter((event) => {
22+
const status = getEventStatus(event.startDateTime, event.endDateTime);
23+
return status === EVENT_STATUS.PAST;
24+
});
3425

3526
return (
3627
<AnimatedSection className="relative">

src/config/i18n/content/bn.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@
6666
"call_for_volunteers": "স্বেচ্ছাসেবকদের জন্য আহ্বান",
6767
"view_all_events": "সব ইভেন্ট দেখুন",
6868
"view_all_past_events": "সব অতীত ইভেন্ট দেখুন",
69-
"coming_soon": "শীঘ্রই আসছে"
69+
"coming_soon": "শীঘ্রই আসছে",
70+
"community_partners_title": "কমিউনিটি পার্টনার",
71+
"community_partners_description": "আমরা দুর্দান্ত কমিউনিটিগুলোর সাথে কাজ করি আপনাদের আরও মূল্য দিতে।",
72+
"become_partner_cta": "পার্টনার হোন",
73+
"partner_visit_label": "ভিজিট",
74+
"partner_visit_cta": "ওপেন"
7075
},
7176
"Blog": {
7277
"title": "ব্লগ থেকে সর্বশেষ",

src/config/i18n/content/en.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@
6666
"call_for_volunteers": "Call for Volunteers",
6767
"view_all_events": "View All Events",
6868
"view_all_past_events": "View All Past Events",
69-
"coming_soon": "Coming Soon"
69+
"coming_soon": "Coming Soon",
70+
"community_partners_title": "Community Partners",
71+
"community_partners_description": "We collaborate with amazing communities to bring more value to you.",
72+
"become_partner_cta": "Become a partner",
73+
"partner_visit_label": "Visit",
74+
"partner_visit_cta": "Open"
7075
},
7176
"Blog": {
7277
"title": "Latest from the Blog",

src/config/i18n/content/fr.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@
5656
"call_for_volunteers": "Appel aux bénévoles",
5757
"view_all_events": "Voir tous les événements",
5858
"view_all_past_events": "Voir tous les événements passés",
59-
"coming_soon": "Bientôt disponible"
59+
"coming_soon": "Bientôt disponible",
60+
"community_partners_title": "Partenaires communautaires",
61+
"community_partners_description": "Nous collaborons avec des communautés formidables pour vous apporter plus de valeur.",
62+
"become_partner_cta": "Devenir partenaire",
63+
"partner_visit_label": "Visiter",
64+
"partner_visit_cta": "Ouvrir"
6065
},
6166
"NotFound": {
6267
"404": "404",

src/config/i18n/content/hi.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@
6666
"call_for_volunteers": "वॉलंटियर्स के लिए कॉल",
6767
"view_all_events": "सभी इवेंट्स देखें",
6868
"view_all_past_events": "सभी पिछले इवेंट्स देखें",
69-
"coming_soon": "जल्द आ रहा है"
69+
"coming_soon": "जल्द आ रहा है",
70+
"community_partners_title": "कम्युनिटी पार्टनर्स",
71+
"community_partners_description": "हम शानदार कम्युनिटीज़ के साथ मिलकर आपके लिए अधिक मूल्य लाते हैं।",
72+
"become_partner_cta": "पार्टनर बनें",
73+
"partner_visit_label": "विज़िट करें",
74+
"partner_visit_cta": "खोलें"
7075
},
7176
"Blog": {
7277
"title": "ब्लॉग से नवीनतम",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"use client";
2+
3+
import AnimatedSection from "@/components/custom/animated-section";
4+
5+
import CommunityPartners from "../event/community-partners";
6+
7+
export default function CommunitySection() {
8+
return (
9+
<AnimatedSection className="relative">
10+
<div className="mx-auto flex max-w-7xl flex-col gap-8 px-4 py-16 sm:px-6 lg:px-8">
11+
<CommunityPartners />
12+
</div>
13+
</AnimatedSection>
14+
);
15+
}

0 commit comments

Comments
 (0)