diff --git a/src/store/actions.ts b/src/store/actions.ts index f382fe3..72be410 100644 --- a/src/store/actions.ts +++ b/src/store/actions.ts @@ -213,7 +213,7 @@ export const clearErros = createAction( // FIXME: Move the rest to their own file export const setSettings = createAction( 'SET_SETTINGS', - (settings: SettingsType) => { + (settings: Partial) => { return { ...settings }; } ); diff --git a/src/store/reducers.ts b/src/store/reducers.ts index e1b0cdb..59e8c15 100644 --- a/src/store/reducers.ts +++ b/src/store/reducers.ts @@ -276,8 +276,8 @@ export interface SettingsType { export const settingsReducer = handleActions( { - [actions.setSettings.toString()]: (_state: {key: string | null}, action: any) => ( - { ...action.payload } + [actions.setSettings.toString()]: (state: { key: string | null }, action: any) => ( + { ...state, ...action.payload } ), }, { locale: 'en-gb' }