import { Reducer } from 'redux' ; import { IUserState , UserActionTypes } from './types' ; const initialState = { login : undefined } ; export const userReducer = ( state = initialState , action ) => { switch ( action . type ) { case UserActionTypes . SET_USER : return { ... state , login : action . payload } ; default : return state ; } } ;