From e5f37b003d93a17c2a9958697269b2d3228d8830 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 4 Mar 2026 23:06:35 -0800 Subject: tuning --- src/routes/+layout.server.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/routes/+layout.server.ts') diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts index 61c46ea6..c14c6f47 100644 --- a/src/routes/+layout.server.ts +++ b/src/routes/+layout.server.ts @@ -1,8 +1,6 @@ import { defaultLocale, loadTranslations, locales } from "$lib/translations/index"; -export const load = async ({ cookies, request, url }) => { - const { pathname } = url; - +export const load = async ({ cookies, request }) => { // Try to get the locale from cookie let locale = (cookies.get("lang") || "").toLowerCase(); @@ -21,13 +19,12 @@ export const load = async ({ cookies, request, url }) => { locale = defaultLocale; } - await loadTranslations(locale, pathname); // keep this just before the `return` + await loadTranslations(locale, "/"); const theme = cookies.get("theme") || "light"; return { theme, - pathname, - i18n: { locale, route: pathname }, + i18n: { locale, route: "/" }, }; }; -- cgit v1.2.3