MyCrypto/common/actions/config.js

29 lines
512 B
JavaScript
Raw Normal View History

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