Files
mypage/app/[locale]/blog/page.tsx
RJ 101624c4d5
All checks were successful
PR Checks / lint-and-build (pull_request) Successful in 18s
📝 priettier check
2025-12-04 15:57:39 +02:00

13 lines
498 B
TypeScript

import { getAllPosts } from '@/lib/markdown'
import BlogPageClient from './blog-client'
import { setRequestLocale } from 'next-intl/server'
export default async function BlogPage({ params }: { params: Promise<{ locale: string }> }) {
const { locale } = await params
await setRequestLocale(locale)
const posts = await getAllPosts(locale)
const allTags = Array.from(new Set(posts.flatMap(post => post.frontmatter.tags))).sort()
return <BlogPageClient posts={posts} allTags={allTags} />
}