From 69950341c11a0b2dd4e8e240c64bedc8a7e0ffd3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:32:30 +0000 Subject: [PATCH 1/2] Update repo structure --- PROJECT_STRUCTURE.md | 30 +++++++++++++++++++++++++++--- repo_structure.txt | 30 +++++++++++++++++++++++++++--- 2 files changed, 54 insertions(+), 6 deletions(-) diff --git a/PROJECT_STRUCTURE.md b/PROJECT_STRUCTURE.md index 072d07d..fe9ca23 100644 --- a/PROJECT_STRUCTURE.md +++ b/PROJECT_STRUCTURE.md @@ -48,9 +48,20 @@ │ ├── exp6.jpeg │ ├── exp7.jpeg │ ├── goal.webp +│ ├── gro1.png +│ ├── gro2.png +│ ├── gro3.svg +│ ├── gro4.svg │ ├── hack1.jpg │ ├── img1.jpg +│ ├── inovate1.png +│ ├── inovate2.png +│ ├── inovate3.png │ ├── mission.webp +│ ├── ser1.png +│ ├── ser2.png +│ ├── ser3.svg +│ ├── ser4.svg │ ├── sopt4.jpg │ ├── spot1.jpg │ ├── spot2.jpg @@ -62,6 +73,8 @@ │ ├── story5.png │ ├── story6.png │ ├── story7.png +│ ├── techeq1.webp +│ ├── techeq2.webp │ └── vision.webp ├── repo_structure.txt ├── src/ @@ -151,6 +164,8 @@ │ │ │ │ └── page.jsx │ │ │ ├── devStudent/ │ │ │ │ └── page.jsx +│ │ │ ├── devfest/ +│ │ │ │ └── page.jsx │ │ │ ├── devprod/ │ │ │ │ └── page.jsx │ │ │ ├── expertdev/ @@ -159,24 +174,32 @@ │ │ │ │ └── page.jsx │ │ │ ├── gitContributors/ │ │ │ │ └── page.jsx +│ │ │ ├── growth/ +│ │ │ │ └── page.jsx │ │ │ ├── helpCenter/ │ │ │ │ └── page.jsx │ │ │ ├── how-apply/ │ │ │ │ └── page.jsx +│ │ │ ├── inovate/ +│ │ │ │ └── page.jsx +│ │ │ ├── ioext/ +│ │ │ │ └── page.jsx │ │ │ ├── localdev/ │ │ │ │ └── page.jsx │ │ │ ├── orginizer/ │ │ │ │ └── page.jsx -│ │ │ ├── participation-terms/ -│ │ │ │ └── page.jsx │ │ │ ├── participationterms/ │ │ │ │ └── page.jsx +│ │ │ ├── services/ +│ │ │ │ └── page.jsx │ │ │ ├── stories/ │ │ │ │ └── page.jsx │ │ │ ├── student-challenge/ │ │ │ │ └── page.jsx │ │ │ ├── sustainable/ │ │ │ │ └── page.jsx +│ │ │ ├── techequity/ +│ │ │ │ └── page.jsx │ │ │ ├── timeline/ │ │ │ │ └── page.jsx │ │ │ ├── who-apply/ @@ -208,7 +231,8 @@ │ │ │ ├── Footer.jsx │ │ │ ├── Header.jsx │ │ │ ├── Hero.jsx -│ │ │ └── Navbar.jsx +│ │ │ ├── Navbar.jsx +│ │ │ └── ProductsNavbar.jsx │ │ └── ui/ │ │ ├── aspect-ratio.jsx │ │ ├── back2top.jsx diff --git a/repo_structure.txt b/repo_structure.txt index 57ec8d0..c240a1f 100644 --- a/repo_structure.txt +++ b/repo_structure.txt @@ -44,9 +44,20 @@ │ ├── exp6.jpeg │ ├── exp7.jpeg │ ├── goal.webp +│ ├── gro1.png +│ ├── gro2.png +│ ├── gro3.svg +│ ├── gro4.svg │ ├── hack1.jpg │ ├── img1.jpg +│ ├── inovate1.png +│ ├── inovate2.png +│ ├── inovate3.png │ ├── mission.webp +│ ├── ser1.png +│ ├── ser2.png +│ ├── ser3.svg +│ ├── ser4.svg │ ├── sopt4.jpg │ ├── spot1.jpg │ ├── spot2.jpg @@ -58,6 +69,8 @@ │ ├── story5.png │ ├── story6.png │ ├── story7.png +│ ├── techeq1.webp +│ ├── techeq2.webp │ └── vision.webp ├── repo_structure.txt ├── src/ @@ -147,6 +160,8 @@ │ │ │ │ └── page.jsx │ │ │ ├── devStudent/ │ │ │ │ └── page.jsx +│ │ │ ├── devfest/ +│ │ │ │ └── page.jsx │ │ │ ├── devprod/ │ │ │ │ └── page.jsx │ │ │ ├── expertdev/ @@ -155,24 +170,32 @@ │ │ │ │ └── page.jsx │ │ │ ├── gitContributors/ │ │ │ │ └── page.jsx +│ │ │ ├── growth/ +│ │ │ │ └── page.jsx │ │ │ ├── helpCenter/ │ │ │ │ └── page.jsx │ │ │ ├── how-apply/ │ │ │ │ └── page.jsx +│ │ │ ├── inovate/ +│ │ │ │ └── page.jsx +│ │ │ ├── ioext/ +│ │ │ │ └── page.jsx │ │ │ ├── localdev/ │ │ │ │ └── page.jsx │ │ │ ├── orginizer/ │ │ │ │ └── page.jsx -│ │ │ ├── participation-terms/ -│ │ │ │ └── page.jsx │ │ │ ├── participationterms/ │ │ │ │ └── page.jsx +│ │ │ ├── services/ +│ │ │ │ └── page.jsx │ │ │ ├── stories/ │ │ │ │ └── page.jsx │ │ │ ├── student-challenge/ │ │ │ │ └── page.jsx │ │ │ ├── sustainable/ │ │ │ │ └── page.jsx +│ │ │ ├── techequity/ +│ │ │ │ └── page.jsx │ │ │ ├── timeline/ │ │ │ │ └── page.jsx │ │ │ ├── who-apply/ @@ -204,7 +227,8 @@ │ │ │ ├── Footer.jsx │ │ │ ├── Header.jsx │ │ │ ├── Hero.jsx -│ │ │ └── Navbar.jsx +│ │ │ ├── Navbar.jsx +│ │ │ └── ProductsNavbar.jsx │ │ └── ui/ │ │ ├── aspect-ratio.jsx │ │ ├── back2top.jsx From b080cce60ce6884f190775a136caa14610c90019 Mon Sep 17 00:00:00 2001 From: Shariq Date: Thu, 31 Oct 2024 05:18:32 +0530 Subject: [PATCH 2/2] Added Support to Events Page to Fetch Events From JSON Server --- data.json | 94 +++++++---------------------- src/app/(pages)/Events/EventItem.js | 6 +- src/app/(pages)/Events/page.jsx | 91 ++++++++-------------------- 3 files changed, 50 insertions(+), 141 deletions(-) diff --git a/data.json b/data.json index bb8ee2e..74dc3c5 100644 --- a/data.json +++ b/data.json @@ -641,81 +641,31 @@ ], "events": [ { - "id": "1", - "title": "Tech for Good Hackathon", - "description": "A 48-hour hackathon focused on leveraging technology to address challenges in healthcare.", - "date": { - "start": "2024-11-01T09:00:00Z", - "end": "2024-11-03T17:00:00Z" - }, - "location": "Online", - "status": "finished", - "prizes": [ - { - "category": "Best Overall Project", - "amount": "$3,000" - }, - { - "category": "Most Innovative Solution", - "amount": "$2,000" - } - ], - "organizers": ["GDSC RCCIIT"], - "participants": 150 - }, - { - "id": "2", - "title": "Web Development Bootcamp", - "description": "A three-day intensive bootcamp to learn web development from scratch.", - "date": { - "start": "2024-09-10T09:00:00Z", - "end": "2024-09-12T17:00:00Z" - }, - "location": "RCCIIT Campus", - "status": "finished", - "organizers": ["GDSC RCCIIT"], - "participants": 50 - }, - { - "id": "3", - "title": "AI & ML Workshop", - "description": "A hands-on workshop on artificial intelligence and machine learning concepts.", - "date": { - "start": "2024-10-15T09:00:00Z", - "end": "2024-10-30T17:00:00Z" - }, - "location": "Online", - "status": "ongoing", - "organizers": ["GDSC RCCIIT"], - "participants": 80 + "title": "GDSC RCCIIT Event : #1", + "date": "18 Jul 2024", + "heading": "Session Highlights", + "description1": "🔍 Live GitHub Profile Reviews: Get feedback on your GitHub profile.", + "description2": "💡 Tips to Enhance Your GitHub: Learn valuable tips and tricks to make your profile stand out.", + "videoSrc": "https://www.youtube.com/embed/H6sHvucuphU?si=qJoRcNyq2GcC2z3C", + "id": "scroll1" }, { - "id": "4", - "title": "Cloud Computing Seminar", - "description": "An interactive seminar discussing cloud computing trends and best practices.", - "date": { - "start": "2024-11-05T14:00:00Z", - "end": "2024-11-05T16:00:00Z" - }, - "location": "Online", - "status": "upcoming", - "registrationLink": "https://example.com/register-cloud-seminar", - "organizers": ["GDSC RCCIIT"], - "participants": 0 + "title": "GDSC RCCIIT Event : #2", + "date": "18 Jul 2024", + "heading": "Session Highlights", + "description1": "🔍 Live GitHub Profile Reviews: Get feedback on your GitHub profile.", + "description2": "💡 Tips to Enhance Your GitHub: Learn valuable tips and tricks to make your profile stand out.", + "videoSrc": "https://www.youtube.com/embed/H6sHvucuphU?si=qJoRcNyq2GcC2z3C", + "id": "scroll2" }, { - "id": "5", - "title": "Mobile App Development Workshop", - "description": "Learn to build mobile applications using Flutter in this hands-on workshop.", - "date": { - "start": "2024-11-15T10:00:00Z", - "end": "2024-11-17T17:00:00Z" - }, - "location": "RCCIIT Campus", - "status": "upcoming", - "registrationLink": "https://example.com/register-mobile-workshop", - "organizers": ["GDSC RCCIIT"], - "participants": 0 + "title": "GDSC RCCIIT Event : #3", + "date": "18 Jul 2024", + "heading": "Session Highlights", + "description1": "🔍 Live GitHub Profile Reviews: Get feedback on your GitHub profile.", + "description2": "💡 Tips to Enhance Your GitHub: Learn valuable tips and tricks to make your profile stand out.", + "videoSrc": "https://www.youtube.com/embed/H6sHvucuphU?si=qJoRcNyq2GcC2z3C", + "id": "scroll3" } - ] + ] } \ No newline at end of file diff --git a/src/app/(pages)/Events/EventItem.js b/src/app/(pages)/Events/EventItem.js index 1b5cbe5..613fda0 100644 --- a/src/app/(pages)/Events/EventItem.js +++ b/src/app/(pages)/Events/EventItem.js @@ -2,7 +2,7 @@ import Link from 'next/link'; import React from 'react'; -const EventItem = ({ title, date, description, videoSrc, id }) => { +const EventItem = ({ title, date, heading, description1, description2, videoSrc, id }) => { return (
@@ -18,7 +18,9 @@ const EventItem = ({ title, date, description, videoSrc, id }) => {

{title}

Date: {date}

-

{description}

+

{heading}

+

{description1}

+

{description2}

Learn More diff --git a/src/app/(pages)/Events/page.jsx b/src/app/(pages)/Events/page.jsx index ac19f5b..400e389 100644 --- a/src/app/(pages)/Events/page.jsx +++ b/src/app/(pages)/Events/page.jsx @@ -5,58 +5,25 @@ import EventItem from './EventItem'; import { motion } from 'framer-motion'; import axios from 'axios'; - const EventsPage = () => { - const events = [ - { - title: 'GDSC RCCIIT Event : #1', - date: '18 Jul 2024', - description: ( - <> - Session Highlights: -
- 🔍 Live GitHub Profile Reviews: Get feedback on your GitHub profile. -
- 💡 Tips to Enhance Your GitHub: Learn valuable tips and tricks to make your profile stand out. - - ), - videoSrc: 'https://www.youtube.com/embed/H6sHvucuphU?si=qJoRcNyq2GcC2z3C', - id: 'scroll1', - }, - { - title: 'GDSC RCCIIT Event : #2', - date: '21 Jul 2024', - description: ( - <> - Session Highlights: -
- 🔍 Live GitHub Profile Reviews: Get feedback on your GitHub profile. -
- 💡 Tips to Enhance Your GitHub: Learn valuable tips and tricks to make your profile stand out. - - ), - videoSrc: 'https://www.youtube.com/embed/H6sHvucuphU?si=qJoRcNyq2GcC2z3C', - id: 'scroll2', - }, - { - title: 'GDSC RCCIIT Event : #3', - date: '7 Aug 2024', - description: ( - <> - Session Highlights: -
- 🔍 Live GitHub Profile Reviews: Get feedback on your GitHub profile. -
- 💡 Tips to Enhance Your GitHub: Learn valuable tips and tricks to make your profile stand out. - - ), - videoSrc: 'https://www.youtube.com/embed/H6sHvucuphU?si=qJoRcNyq2GcC2z3C', - id: 'scroll3', - }, - ]; + const [allEvents, setAllEvents] = useState([]); + const [loading, setLoading] = useState(true); + + useEffect(() => { + axios + .get("http://localhost:5000/events") + .then((response) => { + console.log(response.data) + setAllEvents(response.data); + setLoading(false); + }) + .catch((error) => { + console.error("Error fetching data:", error); + }); + }, []); useEffect(() => { - const scrollItems = events.map(event => event.id); + const scrollItems = allEvents.map(event => event.id); const handleIntersection = (entries, observer) => { entries.forEach((entry) => { @@ -85,21 +52,7 @@ const EventsPage = () => { top: 0, behavior: 'smooth', }); - }, [events]); - - const [allEvents, setAllEvents] = useState([]); - - useEffect(() => { - axios - .get("http://localhost:5000/events") - .then((response) => { - setAllEvents(response.data); - setLoading(false); - }) - .catch((error) => { - console.error("Error fetching data:", error); - }); - }, []); + }, [allEvents]); return (
@@ -130,12 +83,16 @@ const EventsPage = () => { style={{ position: 'relative' }} className="timeline" > - {events.map((event, index) => ( + {!loading ? ( + allEvents.map((event, index) => ( - ))} + )) + ) : ( +

Loading events...

+ )}
); }; -export default EventsPage; \ No newline at end of file +export default EventsPage;