add global find keyword
This commit is contained in:
		
							parent
							
								
									4923cb20c7
								
							
						
					
					
						commit
						24e72aa6e0
					
				
					 8 changed files with 74 additions and 0 deletions
				
			
		|  | @ -1,12 +1,15 @@ | |||
| import settingReducer from './setting'; | ||||
| import findReducer from './find'; | ||||
| 
 | ||||
| // Make setting reducer instead of re-use
 | ||||
| const defaultState = { | ||||
|   setting: settingReducer(undefined, {}), | ||||
|   find: findReducer(undefined, {}), | ||||
| }; | ||||
| 
 | ||||
| export default function reducer(state = defaultState, action = {}) { | ||||
|   return Object.assign({}, state, { | ||||
|     setting: settingReducer(state.setting, action), | ||||
|     find: findReducer(state.find, action), | ||||
|   }); | ||||
| } | ||||
|  |  | |||
		Reference in a new issue