13 lines
344 B
TypeScript
13 lines
344 B
TypeScript
import { GetStaticProps } from "next";
|
|
|
|
import { getCurrentTerm, getProps } from "@/lib/events";
|
|
|
|
import Term, { Props } from "./[year]/[term]/index";
|
|
|
|
export default Term;
|
|
|
|
export const getStaticProps: GetStaticProps<Props> = async () => {
|
|
const curTerm = getCurrentTerm();
|
|
return { props: await getProps(curTerm.year, curTerm.term) };
|
|
};
|