aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers/locale.js
blob: bdd97acb43c198edc6c02b90691eccd8fd8eddb6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
  }
}