1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 03:20:23 +01:00
metamask-extension/ui/app/ducks/locale/locale.js

18 lines
404 B
JavaScript
Raw Normal View History

import { actionConstants } from '../../store/actions'
2018-03-16 01:29:45 +01:00
export default reduceMetamask
2018-03-16 01:29:45 +01:00
function reduceMetamask (state, action) {
2020-01-13 17:29:21 +01:00
const localeMessagesState = { ...state.localeMessages }
2018-03-16 01:29:45 +01:00
switch (action.type) {
case actionConstants.SET_CURRENT_LOCALE:
2020-01-13 17:29:21 +01:00
return {
...localeMessagesState,
current: action.value.messages,
2020-01-13 17:29:21 +01:00
}
2018-03-16 01:29:45 +01:00
default:
return localeMessagesState
}
}