Skip to content

Commit 6f0842f

Browse files
committed
Use new cookie api
1 parent 63bdb06 commit 6f0842f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/lib/tour/onboarding-state.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,15 @@ export function hasSeenWelcome(): boolean {
3535

3636
export function markWelcomed(): void {
3737
try {
38-
document.cookie = `${WELCOME_COOKIE_NAME}=${CURRENT_WELCOME_VERSION}; path=/; expires=${WELCOME_COOKIE_EXPIRES.toUTCString()}; SameSite=Lax`;
38+
cookieStore
39+
.set({
40+
name: WELCOME_COOKIE_NAME,
41+
value: String(CURRENT_WELCOME_VERSION),
42+
path: '/',
43+
expires: WELCOME_COOKIE_EXPIRES.getTime(),
44+
sameSite: 'lax',
45+
})
46+
.catch(() => {});
3947
} catch {
4048
// ignore
4149
}

0 commit comments

Comments
 (0)