Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event section #6

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
run: npm install

- name: Run ESLint
run: npm run lint
run: npm run lint
2 changes: 2 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Routes, Route } from "react-router-dom";

import { Home, Error, Event, Faq, Team } from "./Pages";
import EventSection from "./Components/Event/Event";

const App = () => {
return (
Expand All @@ -10,6 +11,7 @@ const App = () => {
<Route path="/faq" element={<Faq />} />
<Route path="/team" element={<Team />} />
<Route path="*" element={<Error />} />
<Route path="/eventSection" element={<EventSection />} />
</Routes>
);
};
Expand Down
7 changes: 0 additions & 7 deletions src/Components/Event/Card/Card.jsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/Components/Event/Card/Card.module.scss

This file was deleted.

42 changes: 35 additions & 7 deletions src/Components/Event/Event.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
import styles from "./Event.module.scss";
// import data from "../../assets/events.json";
// import card here
import events from "../../assets/events.json";

const Event = () => {
const handleClick = (id) => {
window.location.href = `/event/${id}`;
};

return (
<div className={styles.event}>
Event Section
{/*
Map the event cards here using .map
*/}
<div className={styles.eventBox}>
<h1 className={styles.heading}>Events</h1>
<div className={styles.eventCont}>
<div className={styles.pagebody}>
{events.map((event) => {
return (
<div
key={event.id}
className={styles.card}
onClick={() => handleClick(event.id)}
>
<div className={styles.innerCont}>
<img className={styles.img1} src={event.photo} alt={event.name} />
<div className={styles.content}>
<div className={styles.rectangle}>
<div className={styles.box}>
<p className={styles.title}>{event.name}</p>
</div>
</div>
<p className={styles.description2}>{event.desc2}</p>

<div className={styles.btn5}>View More!</div>
</div>
</div>
</div>
);
})}
</div>
</div>
</div>
);
};
Expand Down
Loading