1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-28 05:12:18 +01:00
metamask-extension/ui/ducks/locale/locale.js

18 lines
472 B
JavaScript
Raw Normal View History

import * as actionConstants from '../../store/actionConstants';
2018-03-16 01:29:45 +01:00
2020-11-03 00:41:28 +01:00
export default function reduceLocaleMessages(state = {}, { type, value }) {
switch (type) {
case actionConstants.SET_CURRENT_LOCALE:
2020-01-13 17:29:21 +01:00
return {
...state,
current: value.messages,
};
2018-03-16 01:29:45 +01:00
default:
return state;
2018-03-16 01:29:45 +01:00
}
}
export const getCurrentLocaleMessages = (state) => state.localeMessages.current;
export const getEnLocaleMessages = (state) => state.localeMessages.en;