File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -20,21 +20,17 @@ async function getBlogContent(year: string, slug: string) {
20
20
21
21
export async function generateMetadata ( {
22
22
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 ) ;
27
26
return {
28
27
title : meta . title ,
29
28
description : meta . description || `Read ${ meta . title } on our blog` ,
30
29
} ;
31
30
}
32
31
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 ;
38
34
const { content, meta } = await getBlogContent ( year , slug ) ;
39
35
40
36
const minuteRead = content . length / 200 ;
Original file line number Diff line number Diff line change 1
- import Link from "next/link" ;
2
1
import { getBlogsByYear } from "@/lib/getBlogs" ;
3
2
import { Timeline } from "@/components/ui/timeline" ;
4
3
You can’t perform that action at this time.
0 commit comments