feat(i18n): wire page translation editor and locale rendering

This commit is contained in:
2026-02-12 20:57:42 +01:00
parent 506e2feb10
commit 618319dbc2
4 changed files with 193 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
import { getPublishedPageBySlug, listPosts } from "@cms/db"
import { getPublishedPageBySlugForLocale, listPosts } from "@cms/db"
import { Button } from "@cms/ui/button"
import { getTranslations } from "next-intl/server"
import { PublicAnnouncements } from "@/components/public-announcements"
@@ -6,9 +6,15 @@ import { PublicPageView } from "@/components/public-page-view"
export const dynamic = "force-dynamic"
export default async function HomePage() {
type HomePageProps = {
params: Promise<{ locale: string }>
}
export default async function HomePage({ params }: HomePageProps) {
const { locale } = await params
const [homePage, posts, t] = await Promise.all([
getPublishedPageBySlug("home"),
getPublishedPageBySlugForLocale("home", locale),
listPosts(),
getTranslations("Home"),
])