All files / src/reducers user.js

100% Statements 10/10
66.67% Branches 4/6
100% Functions 4/4
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 231x 1x   1x     1x           1x             1x      

export const reducers = {
  'log out' (state, action) {
    return {}
  },
  'set auth0 user' (state, action) {
    return {
      ...state,
      ...action.payload
    }
  },
  'set id token' (state, action) {
    return {
      ...state,
      idToken: action.payload
    }
  }
}
 
export const initialState = {
  ...JSON.parse(typeof window === 'undefined' ? '{}' : window.localStorage.getItem('user'))
}