Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7350 Rev 7370
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
  is_logged_in: false,
14
  isAuth: false,
15
  theme_id: '1',
15
  theme_id: '1',
16
}
16
}
Línea 17... Línea 17...
17
 
17
 
18
const AuthReducer = (state = initialState, action) => {
18
const AuthReducer = (state = initialState, action) => {
Línea 19... Línea 19...
19
  const { type, payload } = action
19
  const { type, payload } = action
20
 
20
 
21
  const actionCases = {
21
  const actionCases = {
22
    [actionsTypes.SET_PERMISSIONS]: { ...state, ...payload },
22
    [actionsTypes.SET_PERMISSIONS]: { ...state, ...payload },
23
    [actionsTypes.LOGIN]: { ...state, is_logged_in: true },
23
    [actionsTypes.LOGIN]: { ...state, isAuth: true },
Línea 24... Línea 24...
24
    [actionsTypes.LOGOUT]: { ...state, is_logged_in: false },
24
    [actionsTypes.LOGOUT]: { ...state, isAuth: false },
25
  }
25
  }