Add types

pull/159/head
Jared He 2 years ago
parent 130a71e5d3
commit 9a24bf3076
  1. 11
      pages/events/index.tsx

@ -1,8 +1,13 @@
import { GetStaticProps } from "next";
import Term, {
getStaticProps as termGetStaticProps,
Props,
} from "./[year]/[term]/index";
export async function getStaticProps() {
export default Term;
export const getStaticProps: GetStaticProps<Props> = async () => {
const date = new Date();
let term = "";
const year = date.getUTCFullYear();
@ -30,6 +35,4 @@ export async function getStaticProps() {
},
};
return await termGetStaticProps(context);
}
export default Term;
};

Loading…
Cancel
Save