feat(announcements): add locale audience targeting and published-home news

This commit is contained in:
2026-02-12 23:05:39 +01:00
parent 741883465c
commit 60c9035743
10 changed files with 93 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
import { getPublishedPageBySlugForLocale, listPosts } from "@cms/db"
import { getPublishedPageBySlugForLocale, listPostsForLocale } from "@cms/db"
import { getTranslations } from "next-intl/server"
import { PublicAnnouncements } from "@/components/public-announcements"
import { PublicPageView } from "@/components/public-page-view"
@@ -15,14 +15,14 @@ export default async function HomePage({ params }: HomePageProps) {
const [homePage, posts, t] = await Promise.all([
getPublishedPageBySlugForLocale("home", locale),
listPosts(),
listPostsForLocale(locale),
getTranslations("Home"),
])
return (
<section>
{homePage ? <PublicPageView page={homePage} /> : null}
<PublicAnnouncements placement="homepage" />
<PublicAnnouncements placement="homepage" locale={locale} />
<section className="mx-auto flex w-full max-w-6xl flex-col gap-6 px-6 py-6 pb-16">
<header className="space-y-3">