|
|
|
@ -9,7 +9,7 @@ import { Link } from "@/components/Link"; |
|
|
|
|
import { MiniEventCard } from "@/components/MiniEventCard"; |
|
|
|
|
import { |
|
|
|
|
Event, |
|
|
|
|
getProps, |
|
|
|
|
getEventsPageProps, |
|
|
|
|
getEventYears, |
|
|
|
|
getEventTermsByYear, |
|
|
|
|
} from "@/lib/events"; |
|
|
|
@ -61,7 +61,7 @@ export default function Term(props: Props) { |
|
|
|
|
key={link.year + link.term} |
|
|
|
|
/> |
|
|
|
|
))} |
|
|
|
|
<Link href="/events/archives">Archives</Link> |
|
|
|
|
<Link href="/events/archive">Archive</Link> |
|
|
|
|
</div> |
|
|
|
|
{hasFutureEvents && ( |
|
|
|
|
<> |
|
|
|
@ -88,6 +88,14 @@ export default function Term(props: Props) { |
|
|
|
|
</span> |
|
|
|
|
</h2> |
|
|
|
|
)} |
|
|
|
|
{!hasFutureEvents && !hasPastEvents && ( |
|
|
|
|
<> |
|
|
|
|
<h2>Events</h2> |
|
|
|
|
There are no upcoming or past events for the{" "} |
|
|
|
|
{`${capitalize(props.term)} ${props.year}`} term. Please check back |
|
|
|
|
later! |
|
|
|
|
</> |
|
|
|
|
)} |
|
|
|
|
<div className={styles.miniEventCards}> |
|
|
|
|
{props.pastEvents.map(({ content, metadata }) => ( |
|
|
|
|
<MiniEventCard |
|
|
|
@ -125,9 +133,7 @@ export const getStaticProps: GetStaticProps<Props, Params> = async ( |
|
|
|
|
context |
|
|
|
|
) => { |
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
|
|
|
const { year, term } = context.params!; |
|
|
|
|
|
|
|
|
|
return { props: await getProps(year, term) }; |
|
|
|
|
return { props: await getEventsPageProps(context.params!) }; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export const getStaticPaths: GetStaticPaths<Params> = async () => { |
|
|
|
|