Save settings when they are changed (#3743)
This commit is contained in:
		
							parent
							
								
									6f8f401ea1
								
							
						
					
					
						commit
						afefb364cb
					
				
					 1 changed files with 8 additions and 4 deletions
				
			
		|  | @ -3,10 +3,14 @@ import axios from 'axios'; | ||||||
| export const SETTING_CHANGE = 'SETTING_CHANGE'; | export const SETTING_CHANGE = 'SETTING_CHANGE'; | ||||||
| 
 | 
 | ||||||
| export function changeSetting(key, value) { | export function changeSetting(key, value) { | ||||||
|   return { |   return dispatch => { | ||||||
|     type: SETTING_CHANGE, |     dispatch({ | ||||||
|     key, |       type: SETTING_CHANGE, | ||||||
|     value, |       key, | ||||||
|  |       value, | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     dispatch(saveSettings()); | ||||||
|   }; |   }; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue