From 8e23b264adf6abc6ae745295c39b65dfb6a662bb Mon Sep 17 00:00:00 2001 From: Duyet Le Date: Tue, 12 Nov 2024 01:36:44 +0700 Subject: [PATCH] chore(ui): temp remove year page --- apps/blog/app/[year]/page.tsx | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 apps/blog/app/[year]/page.tsx diff --git a/apps/blog/app/[year]/page.tsx b/apps/blog/app/[year]/page.tsx deleted file mode 100644 index f8435464..00000000 --- a/apps/blog/app/[year]/page.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import YearList from '@duyet/components/YearList' -import { getPostsByAllYear } from '@duyet/libs/getPost' -import { YearPost } from '../../components/year-post' - -// Dynamic segments not included in generateStaticParams will return a 404. -// https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamicparams -export const dynamicParams = false - -interface YearProps { - params: Promise<{ - year: number - }> -} - -export default async function YearPage({ params }: YearProps) { - const { year } = await params - - return ( - <> - - -
- -
- - ) -} - -export async function generateStaticParams() { - const posts = getPostsByAllYear() - - return Object.keys(posts).map((year) => ({ - year, - })) -}