aboutsummaryrefslogblamecommitdiffstats
path: root/ui/app/reducers/locale.js
blob: bdd97acb43c198edc6c02b90691eccd8fd8eddb6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                     







                                                              


                                          



                                
const extend = require('xtend')
const actions = require('../actions')

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,
      })
    default:
      return localeMessagesState
  }
}