Add types
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
130a71e5d3
commit
9a24bf3076
|
@ -1,8 +1,13 @@
|
||||||
|
import { GetStaticProps } from "next";
|
||||||
|
|
||||||
import Term, {
|
import Term, {
|
||||||
getStaticProps as termGetStaticProps,
|
getStaticProps as termGetStaticProps,
|
||||||
|
Props,
|
||||||
} from "./[year]/[term]/index";
|
} from "./[year]/[term]/index";
|
||||||
|
|
||||||
export async function getStaticProps() {
|
export default Term;
|
||||||
|
|
||||||
|
export const getStaticProps: GetStaticProps<Props> = async () => {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
let term = "";
|
let term = "";
|
||||||
const year = date.getUTCFullYear();
|
const year = date.getUTCFullYear();
|
||||||
|
@ -30,6 +35,4 @@ export async function getStaticProps() {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return await termGetStaticProps(context);
|
return await termGetStaticProps(context);
|
||||||
}
|
};
|
||||||
|
|
||||||
export default Term;
|
|
||||||
|
|
Loading…
Reference in New Issue