Fix authentication hydration issue (#1048)

* Fix authentication hydration issue

* reset existing cookies

* Update if statement chaining
This commit is contained in:
Geometrically
2023-03-13 20:21:55 -07:00
committed by GitHub
parent e838fe30de
commit aac2da70cf
6 changed files with 27 additions and 9 deletions

View File

@@ -2,7 +2,7 @@ export const useTheme = () =>
useState('theme', () => {
const colorMode = useCookie('color-mode', {
maxAge: 60 * 60 * 24 * 365 * 10,
sameSite: 'Strict',
sameSite: 'lax',
secure: true,
httpOnly: false,
path: '/',
@@ -27,7 +27,7 @@ export const updateTheme = (value, updatePreference = false) => {
const themeCookie = useCookie('color-mode', {
maxAge: 60 * 60 * 24 * 365 * 10,
sameSite: 'Strict',
sameSite: 'lax',
secure: true,
httpOnly: false,
path: '/',