Skip to content

Commit

Permalink
added filter for events
Browse files Browse the repository at this point in the history
  • Loading branch information
comnk committed Oct 20, 2024
1 parent fc088d8 commit ac4b4f5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/app/(non-home)/events/EventsList.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
export const EventsList = [
{
event_name: 'Brand Design Bootcamp',
event_type: '',
event_name: 'Camp DCo',
event_type: 'GBMs/Socials',
imgLink: 'https://ucsddesign.co/static/media/20240605.79d99bfd.png',
event_link: 'https://www.instagram.com/p/C5uQ6scJhxt/',
date: 'Wednesday, April 17',
location: 'DIB 208'
},
{
event_name: 'Design Frontiers 2024',
event_type: '',
event_type: 'Large-Scale Events',
imgLink: 'https://ucsddesign.co/static/media/20240605.79d99bfd.png',
event_link: 'https://www.instagram.com/p/C5uQ6scJhxt/',
date: 'Wednesday, April 17',
location: 'DIB 208'
},
{
event_name: 'Brand Design Bootcamp',
event_type: '',
event_name: 'Fall Kickoff',
event_type: 'GBMs/Socials',
imgLink: 'https://ucsddesign.co/static/media/20240605.79d99bfd.png',
event_link: 'https://www.instagram.com/p/C5uQ6scJhxt/',
date: 'Wednesday, April 17',
location: 'DIB 208'
},
{
event_name: 'Brand Design Bootcamp',
event_type: '',
event_name: 'Handels Ice Cream Run',
event_type: 'Large-Scale Events',
imgLink: 'https://ucsddesign.co/static/media/20240605.79d99bfd.png',
event_link: 'https://www.instagram.com/p/C5uQ6scJhxt/',
date: 'Wednesday, April 17',
location: 'DIB 208'
},
{
event_name: 'Brand Design Bootcamp',
event_type: '',
event_type: 'GBMs/Socials',
imgLink: 'https://ucsddesign.co/static/media/20240605.79d99bfd.png',
event_link: 'https://www.instagram.com/p/C5uQ6scJhxt/',
date: 'Wednesday, April 17',
Expand Down
6 changes: 5 additions & 1 deletion src/app/(non-home)/events/PastEventSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export default function EventSection() {
// const buttonClass = (buttonNumber: number) =>
// active === buttonNumber ? 'normal' : 'clicked';

const filteredEvents = EventsList.filter(
event => event.event_type === eventType
);

return (
<div className="past-events">
<div className="button-container">
Expand All @@ -40,7 +44,7 @@ export default function EventSection() {
</div>
<h3>2023-2024</h3>
<div className="events-container">
{EventsList.map(item => (
{filteredEvents.map(item => (
<EventCard
key={item.event_name}
event_title={item.event_name}
Expand Down

0 comments on commit ac4b4f5

Please sign in to comment.