From 9a24bf30762783a1199d2d4a2b28b93d21d49d2d Mon Sep 17 00:00:00 2001 From: Jared He <66887902+jaredjhe@users.noreply.github.com> Date: Thu, 19 Aug 2021 10:14:06 -0500 Subject: [PATCH] Add types --- pages/events/index.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pages/events/index.tsx b/pages/events/index.tsx index c233a9c9..5074f1b7 100644 --- a/pages/events/index.tsx +++ b/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 = 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; +};