From a01950d59aa685bc7dead44a89a9789e49f111cb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 6 Nov 2024 23:10:14 -0800 Subject: theme cookie --- src/routes/+layout.server.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/routes/+layout.server.ts') diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts index b4022e69..78a4d012 100644 --- a/src/routes/+layout.server.ts +++ b/src/routes/+layout.server.ts @@ -37,8 +37,10 @@ export const load = async ({ cookies, request, url }) => { } await loadTranslations(locale, pathname); // keep this just before the `return` + const theme = cookies.get("theme"); return { + theme, host, pathname, i18n: { locale, route: pathname }, -- cgit v1.2.3