Proyectos de Subversion LeadersLinked - SPA

Rev

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

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