reducer.js 398 B

1234567891011121314151617181920212223
  1. import * as types from './types';
  2. const initialState = {
  3. auth: null
  4. }
  5. export const authReducer = (state = initialState, action) => {
  6. switch(action.type) {
  7. case types.RUN_AUTH: {
  8. return { ...state }
  9. }
  10. case types.RUN_AUTH_SUCCESS: {
  11. return { ...state }
  12. }
  13. case types.RUN_AUTH_FAIL: {
  14. return { ...state }
  15. }
  16. default: {
  17. return state;
  18. }
  19. }
  20. }