(state = defaultSettings, { payload })
| 13 | state: defaultSettings, |
| 14 | reducers: { |
| 15 | changeSetting(state = defaultSettings, { payload }) { |
| 16 | const { colorWeak, contentWidth } = payload; |
| 17 | |
| 18 | if (state.contentWidth !== contentWidth && window.dispatchEvent) { |
| 19 | window.dispatchEvent(new Event('resize')); |
| 20 | } |
| 21 | |
| 22 | updateColorWeak(!!colorWeak); |
| 23 | return { ...state, ...payload }; |
| 24 | }, |
| 25 | }, |
| 26 | }; |
| 27 | export default SettingModel; |
nothing calls this directly
no test coverage detected