fix: issue with color scheme in layout (#1168)

* fix: issue with color scheme in layout

* test: add and adjust unit tests for sign-in-callback
This commit is contained in:
Meier Lukas
2024-09-26 19:02:45 +02:00
committed by GitHub
parent a30be7bc1e
commit 8f7ed056c4
6 changed files with 127 additions and 14 deletions

View File

@@ -1,3 +1,6 @@
import type { CookieSerializeOptions } from "cookie";
import { serialize } from "cookie";
export function parseCookies(cookieString: string) {
const list: Record<string, string> = {};
const cookieHeader = cookieString;
@@ -15,3 +18,7 @@ export function parseCookies(cookieString: string) {
return list;
}
export function setClientCookie(name: string, value: string, options: CookieSerializeOptions = {}) {
document.cookie = serialize(name, value, options);
}