create-z3 0.0.51 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@ type SavedTheme = z.infer<typeof postThemeValidator>
|
|
|
34
34
|
const storageKey = "_preffered-theme"
|
|
35
35
|
|
|
36
36
|
export const getThemeServerFn = createServerFn().handler(
|
|
37
|
-
async () => (getCookie(storageKey) || "
|
|
37
|
+
async () => (getCookie(storageKey) || "system") as SavedTheme
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
export const setThemeServerFn = createServerFn({ method: "POST" })
|
|
@@ -84,7 +84,7 @@ const themeScript: string = (function () {
|
|
|
84
84
|
return undefined
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
const storedTheme = getCookie('_preffered-theme') ?? '
|
|
87
|
+
const storedTheme = getCookie('_preffered-theme') ?? 'system';
|
|
88
88
|
const validTheme = ['light', 'dark', 'system'].includes(storedTheme) ? storedTheme : 'light';
|
|
89
89
|
|
|
90
90
|
if (validTheme === 'system') {
|