aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/+layout.server.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-04 23:06:35 -0800
committerAdam Soltys <[email protected]>2026-03-04 23:06:35 -0800
commite5f37b003d93a17c2a9958697269b2d3228d8830 (patch)
treee2c3a3c4d1bec48d323e830f5be35d5832845a9a /src/routes/+layout.server.ts
parente6882c6a8987e23215a2538b242431ae603c7101 (diff)
downloadcoinos-ui-e5f37b003d93a17c2a9958697269b2d3228d8830.tar.gz
coinos-ui-e5f37b003d93a17c2a9958697269b2d3228d8830.zip
tuning
Diffstat (limited to 'src/routes/+layout.server.ts')
-rw-r--r--src/routes/+layout.server.ts9
1 files changed, 3 insertions, 6 deletions
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: "/" },
};
};