mirror of
https://github.com/zhigang1992/devhub.git
synced 2026-06-18 03:58:44 +08:00
[Redux] Fix config initial state
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { loadTheme } from '../../../styles/utils'
|
||||
import { Reducer, ThemePair } from '../../../types'
|
||||
|
||||
type State = ThemePair | ''
|
||||
type State = ThemePair | null
|
||||
|
||||
const initialState: State = ''
|
||||
const initialState: State = null
|
||||
|
||||
export const preferredDarkThemeReducer: Reducer<State> = (
|
||||
state = initialState,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { loadTheme } from '../../../styles/utils'
|
||||
import { Reducer, ThemePair } from '../../../types'
|
||||
|
||||
type State = ThemePair | ''
|
||||
type State = ThemePair | null
|
||||
|
||||
const initialState: State = ''
|
||||
const initialState: State = null
|
||||
|
||||
export const preferredLightThemeReducer: Reducer<State> = (
|
||||
state = initialState,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Reducer, ThemePair } from '../../../types'
|
||||
|
||||
type State = ThemePair | ''
|
||||
type State = ThemePair | null
|
||||
|
||||
const initialState: State = ''
|
||||
const initialState: State = null
|
||||
|
||||
export const themeReducer: Reducer<State> = (state = initialState, action) => {
|
||||
switch (action.type) {
|
||||
|
||||
Reference in New Issue
Block a user