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