From 68fdd97348c5506bda5f1c7d2a67c907d818a45c Mon Sep 17 00:00:00 2001 From: akcodez Date: Tue, 23 Jul 2024 16:08:27 -0700 Subject: [PATCH] adds new events to events and community page --- community/events.page.tsx | 43 ++++++++++++++++++++++++++++++--------- community/index.page.tsx | 27 +++++++++++++++++++++++- 2 files changed, 59 insertions(+), 11 deletions(-) diff --git a/community/events.page.tsx b/community/events.page.tsx index 7a206029cd5..9e986dacc4c 100644 --- a/community/events.page.tsx +++ b/community/events.page.tsx @@ -9,6 +9,7 @@ const conference = require("../static/img/events/Conference.png") const zone = require("../static/img/events/XRPLZone.png") const calls = require("../static/img/events/CommunityCalls.png") const brazil = require("../static/img/events/event-meetup-brazil.png") +const korea = require("../static/img/events/SouthKoreaMeetup.png") export const frontmatter = { seo: { title: "Events", @@ -476,7 +477,7 @@ const events = [ link: "https://lu.ma/xrplxccess", location: "South Korea - JBK Tower", date: "September 06, 2023", - image: require("../static/img/events/SouthKoreaMeetup.png"), + image: korea, end_date: "September 06, 2023", }, { @@ -719,7 +720,7 @@ const events = [ { name: "XRPL Meetup Blockchain Rio", description: - "Get ready to kick off Blockchain Rio with a bang at the XRP Ledger Dev Meetup! ​Hosted by the the XRP Ledger team, this warm-up event is the perfect chance for devs and builders to connect, share ideas, and get hyped for the main event. Expect a night filled with great conversations, delicious drinks, and the vibrant energy of Rio de Janeiro. ​Don't miss out on this fantastic opportunity to network and have a blast with fellow tech enthusiasts. See you there!", + "Kick off Blockchain Rio with the XRP Ledger Dev Meetup, a warm-up event hosted by the XRP Ledger community. Join fellow developers and builders for a night of great conversations, delicious drinks, and the vibrant energy of Rio de Janeiro. Don't miss this fantastic opportunity to network and have a blast with fellow tech enthusiasts!", type: "meetup", link: "https://lu.ma/4uxpkd11", location: "Rio de Janeiro", @@ -727,6 +728,28 @@ const events = [ image: brazil, end_date: "July 23, 2024", }, + { + name: "XRPL Zone Seoul", + description: + "Join us at XRPL Zone Seoul where developers, corporates, fintechs, banks, VCs, academia, and the XRP community come together under one roof for the biggest XRPL event in South Korea!", + type: "zone", + link: "https://ripple.swoogo.com/xrpl-zone-seoul", + location: "Seongdong-su, Seoul", + date: "September 4, 2024", + image: zone, + end_date: "September 4, 2024", + }, + { + name: "XRP Community After Hours", + description: + "Celebrate with the XRP Community during Korea Blockchain Week! Don’t miss this opportunity to mingle with the vibrant XRP community, visionary XRPL developers, trailblazing innovators, and influential investors.", + type: "meetup", + link: "https://lu.ma/mbg067j3", + location: "Seongdong-su, Seoul", + date: "September 4, 2024", + image: korea, + end_date: "September 4, 2024", + }, ]; export default function Events() { @@ -756,30 +779,30 @@ export default function Events() { const filteredUpcoming = useMemo(() => { return upcoming.filter( - (event) => upcomingFilters[event.type.split("-")[0]] + (event) => upcomingFilters[event.type.split("-")[0]] !== false ); }, [upcoming, upcomingFilters]); - + const filteredPast = useMemo(() => { - return past.filter((event) => pastFilters[event.type.split("-")[0]]); + return past.filter((event) => pastFilters[event.type.split("-")[0]] !== false); }, [past, pastFilters]); - + const handleUpcomingFilterChange = (event) => { const { name, checked } = event.target; setUpcomingFilters((prevFilters) => ({ ...prevFilters, - [name.replace("-upcoming", "")]: checked, + [name.split("-")[0]]: checked, })); }; - + const handlePastFilterChange = (event) => { const { name, checked } = event.target; setPastFilters((prevFilters) => ({ ...prevFilters, - [name.replace("-past", "")]: checked, + [name.split("-")[0]]: checked, })); }; - + return (
diff --git a/community/index.page.tsx b/community/index.page.tsx index e7338008f27..274274bfbec 100644 --- a/community/index.page.tsx +++ b/community/index.page.tsx @@ -15,6 +15,7 @@ const hackathon = require("../static/img/events/Hackathons.png"); const conference = require("../static/img/events/Conference.png"); const zone = require("../static/img/events/XRPLZone.png"); const brazil = require("../static/img/events/event-meetup-brazil.png"); +const korea = require("../static/img/events/SouthKoreaMeetup.png") const findNearestUpcomingEvent = (events) => { let nearestEvent = null; let nearestDateDiff = Infinity; @@ -178,12 +179,36 @@ const events = [ start_date: "July 23, 2024", end_date: "July 23, 2024", }, + { + name: "XRPL Zone Seoul", + description: + "Join us at XRPL Zone Seoul where developers, corporates, fintechs, banks, VCs, academia, and the XRP community come together under one roof for the biggest XRPL event in South Korea!", + type: "zone", + link: "https://ripple.swoogo.com/xrpl-zone-seoul", + location: "Seongdong-su, Seoul", + date: "September 4, 2024", + image: zone, + start_date: "September 4, 2024", + end_date: "September 4, 2024", + }, + { + name: "XRP Community After Hours", + description: + "Celebrate with the XRP Community during Korea Blockchain Week! Don't miss this opportunity to mingle with the vibrant XRP community, visionary XRPL developers, trailblazing innovators, and influential investors.", + type: "meetup", + link: "https://lu.ma/mbg067j3", + location: "Seongdong-su, Seoul", + date: "September 4, 2024", + image: korea, + start_date: "September 4, 2024", + end_date: "September 4, 2024", + }, ]; const { nearestDateDiff, nearestEvent } = findNearestUpcomingEvent(events); const XrplEventsAndCarouselSection = ({ events }) => { const { useTranslate } = useThemeHooks(); const { translate } = useTranslate(); - const [currentIndex, setCurrentIndex] = useState(7); + const [currentIndex, setCurrentIndex] = useState(11); const updateCarousel = () => { const prevEvent = events[currentIndex - 1] || null;