import { Action, combineReducers, createReducer, on } from '@ngrx/store';
import { State, initialState } from './state';
import { loginSuccess } from './actions';

export const reducer = createReducer(
  initialState,
  on(loginSuccess, (state, action) => {
    return {
      ...state,
      loginRes: action.loginRes
    };
  })
);
