www-new/pages/events/index.tsx

13 lines
344 B
TypeScript
Raw Normal View History

2021-08-19 11:14:06 -04:00
import { GetStaticProps } from "next";
2021-08-27 17:57:16 -04:00
import { getCurrentTerm, getProps } from "@/lib/events";
import Term, { Props } from "./[year]/[term]/index";
2021-08-18 17:57:09 -04:00
2021-08-19 11:14:06 -04:00
export default Term;
export const getStaticProps: GetStaticProps<Props> = async () => {
2021-08-27 17:57:16 -04:00
const curTerm = getCurrentTerm();
return { props: await getProps(curTerm.year, curTerm.term) };
2021-08-19 11:14:06 -04:00
};