next-ucap-messenger/projects/ucap-webmessenger-app/src/app/store/messenger/room/reducers.ts

16 lines
392 B
TypeScript
Raw Normal View History

2019-10-08 02:19:47 +00:00
import { createReducer, on } from '@ngrx/store';
import { initialState } from './state';
import { infoSuccess } from './actions';
export const reducer = createReducer(
initialState,
on(infoSuccess, (state, action) => {
return {
...state,
roomInfo: action.roomInfo,
userInfoList: action.userInfoList,
userInfoShortList: action.userInfoShortList
};
})
);