Skip to content

Commit 3ffbc7a

Browse files
authored
Merge pull request #25 from lade6501/main
feat : Added /events page
2 parents 10b26ff + 844ac69 commit 3ffbc7a

File tree

8 files changed

+359
-3
lines changed

8 files changed

+359
-3
lines changed

package-lock.json

Lines changed: 101 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
},
1414
"dependencies": {
1515
"@popperjs/core": "^2.11.8",
16+
"axios": "^1.7.7",
1617
"bootstrap": "^5.3.3",
1718
"firebase": "^10.13.1",
1819
"marked": "^14.1.2",
20+
"prop-types": "^15.8.1",
1921
"react": "^18.3.1",
2022
"react-dom": "^18.3.1",
2123
"react-router-dom": "^6.26.2",

public/dummyEvents.json

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
[
2+
{
3+
"event_id": 1,
4+
"event_title": "React Hackathon",
5+
"event_date": {
6+
"day": "5",
7+
"month": "Oct",
8+
"year": "2024"
9+
},
10+
"event_description": "A 48-hour hackathon focused on building innovative projects using React.",
11+
"event_image": "https://example.com/react-hackathon.jpg"
12+
},
13+
{
14+
"event_id": 2,
15+
"event_title": "Hacktoberfest Kickoff",
16+
"event_date": {
17+
"day": "10",
18+
"month": "Oct",
19+
"year": "2024"
20+
},
21+
"event_description": "Join open-source contributors to celebrate the start of Hacktoberfest with exciting challenges and prizes.",
22+
"event_image": "https://example.com/hacktoberfest-kickoff.jpg"
23+
},
24+
{
25+
"event_id": 3,
26+
"event_title": "GSSoC Final Submissions",
27+
"event_date": {
28+
"day": "25",
29+
"month": "Mar",
30+
"year": "2024"
31+
},
32+
"event_description": "Final day for participants to submit their code contributions for the GirlScript Summer of Code 2024.",
33+
"event_image": "https://example.com/gssoc-submissions.jpg"
34+
},
35+
{
36+
"event_id": 4,
37+
"event_title": "API Design Workshop",
38+
"event_date": {
39+
"day": "18",
40+
"month": "Nov",
41+
"year": "2024"
42+
},
43+
"event_description": "Learn best practices in API design for modern web applications in this hands-on workshop.",
44+
"event_image": "https://example.com/api-design-workshop.jpg"
45+
},
46+
{
47+
"event_id": 5,
48+
"event_title": "Hacktoberfest Closing Ceremony",
49+
"event_date": {
50+
"day": "31",
51+
"month": "Oct",
52+
"year": "2024"
53+
},
54+
"event_description": "Celebrate the end of Hacktoberfest with a recap of the top contributors and projects.",
55+
"event_image": "https://example.com/hacktoberfest-closing.jpg"
56+
},
57+
{
58+
"event_id": 6,
59+
"event_title": "JavaScript Deep Dive Meetup",
60+
"event_date": {
61+
"day": "12",
62+
"month": "Nov",
63+
"year": "2024"
64+
},
65+
"event_description": "Explore advanced JavaScript concepts in this interactive meetup session.",
66+
"event_image": "https://example.com/js-deep-dive.jpg"
67+
},
68+
{
69+
"event_id": 7,
70+
"event_title": "GSSoC Mentorship Day",
71+
"event_date": {
72+
"day": "15",
73+
"month": "Dec",
74+
"year": "2024"
75+
},
76+
"event_description": "A day dedicated to mentoring new contributors as part of the GirlScript Summer of Code program.",
77+
"event_image": "https://example.com/gssoc-mentorship.jpg"
78+
},
79+
{
80+
"event_id": 8,
81+
"event_title": "Hacktoberfest Project Showcase",
82+
"event_date": {
83+
"day": "22",
84+
"month": "Oct",
85+
"year": "2024"
86+
},
87+
"event_description": "Participants present their projects from Hacktoberfest in this showcase event.",
88+
"event_image": "https://example.com/hacktoberfest-showcase.jpg"
89+
},
90+
{
91+
"event_id": 9,
92+
"event_title": "Full-Stack JavaScript Webinar",
93+
"event_date": {
94+
"day": "2",
95+
"month": "Dec",
96+
"year": "2024"
97+
},
98+
"event_description": "Learn full-stack development using JavaScript with real-world examples and expert guidance.",
99+
"event_image": "https://example.com/full-stack-js-webinar.jpg"
100+
},
101+
{
102+
"event_id": 10,
103+
"event_title": "React Native Bootcamp",
104+
"event_date": {
105+
"day": "7",
106+
"month": "Nov",
107+
"year": "2024"
108+
},
109+
"event_description": "An intensive bootcamp for developers looking to dive deep into React Native for mobile app development.",
110+
"event_image": "https://example.com/react-native-bootcamp.jpg"
111+
}
112+
]

src/App.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import Dashboard from './pages/Dashboard';
2121
import courses from './data/courseData';
2222
import Footer from './components/Footer';
2323
import Contributors from './pages/GithubFetch';
24+
import Events from './pages/Events';
2425

2526
function App() {
2627
const [user, setUser] = useState(null);
@@ -70,6 +71,7 @@ function App() {
7071
<Route path="/" element={<Dashboard courses={courses} />} />
7172
<Route path="/search" element={<SearchResults />} />
7273
<Route path="/contributors" element={<Contributors />}></Route>
74+
<Route path="/events" element={<Events />} />
7375
</Routes>
7476
<ToastContainer />
7577
</div>

src/components/EventCard.jsx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import logo from '@/assets/images/logo.png';
2+
import PropTypes from 'prop-types';
3+
4+
function EventCard({ eventDetails }) {
5+
return (
6+
<>
7+
<div className="col-md-4 mb-4">
8+
<div className="card shining-card h-100">
9+
<div className="event-date rounded-circle">
10+
<div className="day">{eventDetails.event_date.day}</div>
11+
<div className="month">{eventDetails.event_date.month}</div>
12+
</div>
13+
<img src={logo} className="event-image card-img-top" />
14+
<div className="card-body text-center">
15+
<h3 className="card-title">{eventDetails.event_title}</h3>
16+
<p className="card-text">{eventDetails.event_description}</p>
17+
</div>
18+
<div className="card-footer text-center">
19+
<button className="btn">View Details</button>
20+
</div>
21+
</div>
22+
</div>
23+
</>
24+
);
25+
}
26+
27+
EventCard.propTypes = {
28+
eventDetails: PropTypes.shape({
29+
event_title: PropTypes.string,
30+
event_date: PropTypes.shape({
31+
day: PropTypes.string,
32+
month: PropTypes.string,
33+
year: PropTypes.string,
34+
}),
35+
event_description: PropTypes.string,
36+
event_image: PropTypes.string,
37+
}).isRequired,
38+
};
39+
40+
export default EventCard;

0 commit comments

Comments
 (0)