We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a9c4b8 commit a0b16e2Copy full SHA for a0b16e2
1 file changed
packages/react/src/stores/theme-store.ts
@@ -4,12 +4,10 @@ import type { DevupTheme } from '../types/theme'
4
type Theme = keyof DevupTheme | null
5
type StoreChangeEvent = (newTheme: Theme) => void
6
7
-const initTheme = null
8
-
9
function createClientThemeStore() {
10
const el = document.documentElement
11
const subscribers: Set<StoreChangeEvent> = new Set()
12
- let theme: Theme = initTheme
+ let theme: Theme = null
13
const get = () => theme
14
const set = (newTheme: Theme) => {
15
theme = newTheme
@@ -45,7 +43,7 @@ export function createServerThemeStore(): ReturnType<
45
43
typeof createClientThemeStore
46
44
> {
47
return {
48
- get: () => initTheme,
+ get: () => null,
49
set: () => {},
50
subscribe: () => () => {},
51
} as unknown as ReturnType<typeof createClientThemeStore>
0 commit comments