Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6493 | Rev 6496 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 6493 Rev 6495
Línea 1... Línea 1...
1
import { actionsTypes } from './auth.types'
1
import { actionsTypes } from './auth.types'
Línea 2... Línea 2...
2
 
2
 
3
const initialState = {
3
const initialState = {
4
  permissions: null,
4
  permissions: '',
Línea 5... Línea 5...
5
}
5
}
6
 
6
 
7
export default function AuthReducer(state = initialState, { type, payload }) {
7
export default function AuthReducer(state = initialState, { type, payload }) {
8
  switch (type) {
8
  switch (type) {
9
    case actionsTypes.SET_PERMISSIONS:
9
    case actionsTypes.SET_PERMISSIONS:
10
      return {
10
      return {
11
        ...state,
11
        ...state,
12
        permissions: payload,
12
        payload,
13
      }
13
      }
14
    default:
14
    default:
15
      return state
15
      return state