|
|
|
@ -3,6 +3,11 @@ import { GetStaticProps } from "next"; |
|
|
|
|
import React from "react"; |
|
|
|
|
|
|
|
|
|
import { Link } from "@/components/Link"; |
|
|
|
|
import { |
|
|
|
|
ShapesConfig, |
|
|
|
|
GetShapesConfig, |
|
|
|
|
defaultGetShapesConfig, |
|
|
|
|
} from "@/components/ShapesBackground"; |
|
|
|
|
|
|
|
|
|
import styles from "./archive.module.css"; |
|
|
|
|
|
|
|
|
@ -32,6 +37,12 @@ export default function NewsArchive({ items }: Props) { |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
NewsArchive.getShapesConfig = ((width, height) => { |
|
|
|
|
return window.innerWidth <= 768 |
|
|
|
|
? ({} as ShapesConfig) |
|
|
|
|
: defaultGetShapesConfig(width, height); |
|
|
|
|
}) as GetShapesConfig; |
|
|
|
|
|
|
|
|
|
export const getStaticProps: GetStaticProps<Props> = async () => { |
|
|
|
|
const years = (await getNewsYears()).reverse(); |
|
|
|
|
const yearsWithTerms = await Promise.all( |
|
|
|
|