routes/index: use m.home_title() + pass undefined locale to findPosts
Build & Deploy unom website / build (push) Successful in 21s
Build & Deploy unom website / deploy (push) Successful in 5s

Title was hardcoded to the German string when I migrated the rest of
the site to paraglide — the rest of the site looked correct on /en/
because the localized meta came from the root route's head() which DID
use m.foo(). Index also passed 'de' literally to findPosts, ignoring
the request locale.
This commit is contained in:
2026-05-26 19:33:45 +02:00
parent 7bf10b6a12
commit 3eec9ba8b7
+3 -2
View File
@@ -1,5 +1,6 @@
import { createFileRoute } from "@tanstack/react-router";
import { findPosts } from "@/lib/cms";
import { m } from "@/paraglide/messages";
import Landing from "@/sections/Landing";
import LatestPosts from "@/sections/LatestPosts";
@@ -7,7 +8,7 @@ export const Route = createFileRoute("/")({
loader: async () => {
// Soft-fail on CMS hiccups so the hero still renders.
try {
const { docs } = await findPosts("de", 2);
const { docs } = await findPosts(undefined, 2);
return { posts: docs };
} catch {
return { posts: [] };
@@ -15,7 +16,7 @@ export const Route = createFileRoute("/")({
},
component: HomePage,
head: () => ({
meta: [{ title: "unom - Kreative Webentwicklung" }],
meta: [{ title: m.home_title() }],
}),
});