import { PostListItem } from "@marketing/blog/components/PostListItem"; import { getAllPosts } from "@marketing/blog/utils/lib/posts"; import { getLocale, getTranslations } from "next-intl/server"; export async function generateMetadata() { const t = await getTranslations(); return { title: t("blog.title"), }; } export default async function BlogListPage() { const locale = await getLocale(); const t = await getTranslations(); const posts = await getAllPosts(); return (

{t("blog.title")}

{t("blog.description")}

{posts .filter((post) => post.published && locale === post.locale) .sort( (a, b) => new Date(b.date).getTime() - new Date(a.date).getTime(), ) .map((post) => ( ))}
); }