mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 09:04:44 -04:00
Reorganize redux types to avoid unnecessary type casting
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
a221ce4255
commit
6a43d0c5fb
27 changed files with 113 additions and 153 deletions
|
@ -8,11 +8,10 @@ import { store } from '..'
|
|||
import { DarkModeConfig, DarkModeConfigActionType, SetDarkModeConfigAction } from './types'
|
||||
|
||||
export const setDarkMode = (darkMode: boolean): void => {
|
||||
const action: SetDarkModeConfigAction = {
|
||||
store.dispatch({
|
||||
type: DarkModeConfigActionType.SET_DARK_MODE,
|
||||
darkMode: darkMode
|
||||
}
|
||||
store.dispatch(action)
|
||||
} as SetDarkModeConfigAction)
|
||||
}
|
||||
|
||||
export const saveToLocalStorage = (darkModeConfig: DarkModeConfig): void => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue