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
417 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_LOCALE_MESSAGES:
return extend(localeMessagesState, {
current: action.value,
})
2018-03-16 01:29:45 +01:00
default:
return localeMessagesState
}
}