Skip to content

Commit 97bfcee

Browse files
committed
fix
1 parent da68991 commit 97bfcee

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

app/blogs/[year]/[slug]/page.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,17 @@ async function getBlogContent(year: string, slug: string) {
2020

2121
export async function generateMetadata({
2222
params,
23-
}: {
24-
params: { year: string; slug: string };
25-
}): Promise<Metadata> {
26-
const { meta } = await getBlogContent(params.year, params.slug);
23+
}: any): Promise<Metadata> {
24+
const { year, slug } = await params;
25+
const { meta } = await getBlogContent(year, slug);
2726
return {
2827
title: meta.title,
2928
description: meta.description || `Read ${meta.title} on our blog`,
3029
};
3130
}
3231

33-
export default async function BlogPage({
34-
params: { year, slug },
35-
}: {
36-
params: { year: string; slug: string };
37-
}) {
32+
export default async function BlogPage({ params }: any) {
33+
const { year, slug } = await params;
3834
const { content, meta } = await getBlogContent(year, slug);
3935

4036
const minuteRead = content.length / 200;

app/blogs/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Link from "next/link";
21
import { getBlogsByYear } from "@/lib/getBlogs";
32
import { Timeline } from "@/components/ui/timeline";
43

0 commit comments

Comments
 (0)