MyCrypto/common/actions/config.js

29 lines
512 B
JavaScript
Raw Normal View History

2017-04-24 18:59:28 -05:00
// @flow
2017-07-04 05:25:01 +04:00
export type ChangeNodeAction = {
2017-07-03 22:21:19 -05:00
type: 'CONFIG_NODE_CHANGE',
// FIXME $keyof?
value: string
2017-05-25 04:06:30 +04:00
};
2017-07-04 05:25:01 +04:00
export type ChangeLanguageAction = {
2017-07-03 22:21:19 -05:00
type: 'CONFIG_LANGUAGE_CHANGE',
value: string
2017-07-04 05:25:01 +04:00
};
export type ConfigAction = ChangeNodeAction | ChangeLanguageAction;
export function changeLanguage(sign: string) {
2017-07-03 22:21:19 -05:00
return {
type: 'CONFIG_LANGUAGE_CHANGE',
value: sign
};
2017-07-04 05:25:01 +04:00
}
2017-07-04 05:25:01 +04:00
export function changeNode(value: string): ChangeNodeAction {
2017-07-03 22:21:19 -05:00
return {
type: 'CONFIG_NODE_CHANGE',
value
};
2017-07-04 05:25:01 +04:00
}