Save settings when they are changed (#3743)

rebase/4.0.0rc2
Eugen Rochko 2017-06-14 18:59:02 +02:00 committed by GitHub
parent e17c2e5da5
commit 80c13bf0ef
1 changed files with 8 additions and 4 deletions

View File

@ -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());
}; };
}; };