1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-30 16:18:07 +01:00
metamask-extension/ui/app/ducks/locale/locale.js

18 lines
425 B
JavaScript
Raw Normal View History

2018-03-16 01:29:45 +01:00
const extend = require('xtend')
const actions = require('../../store/actions')
2018-03-16 01:29:45 +01:00
module.exports = reduceMetamask
function reduceMetamask (state, action) {
const localeMessagesState = extend({}, state.localeMessages)
switch (action.type) {
case actions.SET_CURRENT_LOCALE:
return extend(localeMessagesState, {
current: action.value.messages,
})
2018-03-16 01:29:45 +01:00
default:
return localeMessagesState
}
}