|
|
|
@ -67,8 +67,8 @@ export default function Term(props: Props) { |
|
|
|
|
<Link href="/events/archive">Archive</Link> |
|
|
|
|
</div> |
|
|
|
|
{hasFutureEvents && ( |
|
|
|
|
<> |
|
|
|
|
<h2>Upcoming Events</h2> |
|
|
|
|
<section> |
|
|
|
|
<h1>Upcoming Events</h1> |
|
|
|
|
<div className={styles.miniEventCards}> |
|
|
|
|
{props.futureEvents.map(({ content, metadata }) => ( |
|
|
|
|
<EventCard |
|
|
|
@ -81,20 +81,34 @@ export default function Term(props: Props) { |
|
|
|
|
</EventCard> |
|
|
|
|
))} |
|
|
|
|
</div> |
|
|
|
|
</> |
|
|
|
|
</section> |
|
|
|
|
)} |
|
|
|
|
{hasPastEvents && props.isCurrentTerm && ( |
|
|
|
|
<section> |
|
|
|
|
<h1>Past Events</h1> |
|
|
|
|
<div className={styles.miniEventCards}> |
|
|
|
|
{props.pastEvents.map(({ content, metadata }) => ( |
|
|
|
|
<MiniEventCard |
|
|
|
|
{...metadata} |
|
|
|
|
date={new Date(metadata.date)} |
|
|
|
|
description={<MDXRemote {...content} />} |
|
|
|
|
key={metadata.name + metadata.date.toString()} |
|
|
|
|
/> |
|
|
|
|
))} |
|
|
|
|
</div> |
|
|
|
|
</section> |
|
|
|
|
)} |
|
|
|
|
{hasPastEvents && props.isCurrentTerm && <h2>Past Events</h2>} |
|
|
|
|
{hasPastEvents && !props.isCurrentTerm && ( |
|
|
|
|
<h2> |
|
|
|
|
<h1> |
|
|
|
|
Events Archive: |
|
|
|
|
<span className={styles.blue}> |
|
|
|
|
{` ${capitalize(props.term)} ${props.year}`} |
|
|
|
|
</span> |
|
|
|
|
</h2> |
|
|
|
|
</h1> |
|
|
|
|
)} |
|
|
|
|
{!hasFutureEvents && !hasPastEvents && ( |
|
|
|
|
<> |
|
|
|
|
<h2>Events</h2> |
|
|
|
|
<h1>Events</h1> |
|
|
|
|
There are no upcoming or past events for the{" "} |
|
|
|
|
{`${capitalize(props.term)} ${props.year}`} term. Please check back |
|
|
|
|
later! |
|
|
|
|