16 lines
392 B
TypeScript
16 lines
392 B
TypeScript
|
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
|
||
|
};
|
||
|
})
|
||
|
);
|