Skip to content

Commit

Permalink
show only upcoming events
Browse files Browse the repository at this point in the history
- eventsPage.tsx: handle no upcoming events, show only future events
- Events.module.scss: add styling for message displayed on eventsPage
  • Loading branch information
ArshMalik02 committed Sep 24, 2023
1 parent 892ccd8 commit b355957
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
15 changes: 6 additions & 9 deletions pages/eventsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,18 @@ export default function Events({ events }: Props): JSX.Element {
);
});

if (committee === 'board') {
filteredEvents.shift();
}

return (
<MainLayout>
<div className={styles.main}>
<h1 className={styles.title}>Events</h1>
{/* <p className={styles.description}>
Event descriptions Event descriptionsEvent descriptionsEvent
descriptionsEvent descriptionsEvent descriptions Event
descriptionsEvent descriptionsEvent descriptions
</p> */}
<div>
<h2 className={styles.subtitle}>Upcoming Events</h2>
{/* if there are no events, display a message */}
{filteredEvents.length === 0 && (
<div>
<h4 className={styles.message}>Stay tuned for more events!</h4>
</div>
)}
{filteredEvents.map((event, index) => {
const start = format(new Date(event.start), 'h:mma');
const end = format(new Date(event.end), 'h:mma');
Expand Down
8 changes: 8 additions & 0 deletions styles/Events.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
color: vars.$committee-color;
}

.message {
font-weight: 400;
font-size: 28px;
margin-left: 1rem;
margin-top: 2rem;
color: #313235;
}

.card {
min-height: 200px;
text-align: center;
Expand Down

0 comments on commit b355957

Please sign in to comment.