Skip to content

Commit

Permalink
set theme cookie maxAge so it's not a session cookie (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
xHomu authored Dec 6, 2023
1 parent a8b592f commit 5a226e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/utils/theme.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export function setTheme(theme: Theme | 'system') {
if (theme === 'system') {
return cookie.serialize(cookieName, '', { path: '/', maxAge: -1 })
} else {
return cookie.serialize(cookieName, theme, { path: '/' })
return cookie.serialize(cookieName, theme, { path: '/', maxAge: 31536000 })
}
}

0 comments on commit 5a226e2

Please sign in to comment.