Skip to content

Commit

Permalink
Set preferred mode cookie on /app/home as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Macludde committed Oct 7, 2024
1 parent e6473e8 commit d958e55
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/routes/(app)/app/home/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { APP_PREFERRED_PAGE_COOKIE } from "$lib/components/postReveal/types";
import { loadHomeData } from "$lib/server/loadHomeData";
import type { PageServerLoad } from "./$types";

export const load: PageServerLoad = async ({ locals, fetch }) => {
export const load: PageServerLoad = async ({ locals, fetch, cookies }) => {
if (locals.isApp)
cookies.set(APP_PREFERRED_PAGE_COOKIE, "dsek", {
path: "/",
});
return await loadHomeData({ locals, fetch });
};

0 comments on commit d958e55

Please sign in to comment.