Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 7370 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 7370 Rev 7371
Línea 11... Línea 11...
11
  navbar_url: '',
11
  navbar_url: '',
12
  remember: true,
12
  remember: true,
13
  site_key: '',
13
  site_key: '',
14
  isAuth: false,
14
  isAuth: false,
15
  theme_id: '1',
15
  theme_id: '1',
-
 
16
  loading: true,
16
}
17
}
Línea 17... Línea 18...
17
 
18
 
18
const AuthReducer = (state = initialState, action) => {
19
const AuthReducer = (state = initialState, action) => {
Línea 19... Línea 20...
19
  const { type, payload } = action
20
  const { type, payload } = action
20
 
21
 
21
  const actionCases = {
22
  const actionCases = {
22
    [actionsTypes.SET_PERMISSIONS]: { ...state, ...payload },
23
    [actionsTypes.SET_PERMISSIONS]: { ...state, ...payload },
-
 
24
    [actionsTypes.LOGIN]: { ...state, isAuth: true },
-
 
25
    [actionsTypes.LOGOUT]: { ...state, isAuth: false },
23
    [actionsTypes.LOGIN]: { ...state, isAuth: true },
26
    [actionsTypes.START_LOADING]: { ...state, loading: true },
Línea 24... Línea 27...
24
    [actionsTypes.LOGOUT]: { ...state, isAuth: false },
27
    [actionsTypes.STOP_LOADING]: { ...state, loading: false },
25
  }
28
  }