import Link from 'next/link'; import { getAllPosts } from '@/lib/blog'; import { useTranslations } from 'next-intl'; interface BlogIndexProps { params: { locale: string; }; } export default async function BlogIndex({ params: { locale } }: BlogIndexProps) { const posts = await getAllPosts(locale); return (

Blog

{posts.map((post) => (
{post.frontmatter.featuredImage && (
{post.frontmatter.title}
)}
{new Date(post.frontmatter.date).toLocaleDateString(locale)}

{post.frontmatter.title}

{post.frontmatter.excerpt}

Read more →
))}
); }