Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6500 | Rev 6513 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

import { actionsTypes } from './auth.types'

const initialState = {
  access_usign_social_networks: '',
  aes: '',
  defaultNetwork: '',
  email: '',
  favico_url: '',
  intro: '',
  logo_url: '',
  navbar_url: '',
  remember: false,
  site_key: '',
}

const AuthReducer = (state = initialState, action) => {
  const { type, payload } = action

  const actionCases = {
    [actionsTypes.SET_PERMISSIONS]: { ...state, ...payload },
  }

  return actionCases[type] || state
}

export default AuthReducer