1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 02:58:09 +01:00
metamask-extension/ui/app/ducks/locale/locale.js

18 lines
463 B
JavaScript
Raw Normal View History

import actionConstants from '../../store/actionConstants'
2018-03-16 01:29:45 +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,
2020-01-13 17:29:21 +01:00
}
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