Park Byung Eun 0c9867beb9 sync
2020-08-10 14:05:57 +09:00

21 lines
410 B
TypeScript

import { createReducer, on } from '@ngrx/store';
import { initialState } from './state';
import { loginSuccess, logoutSuccess } from './actions';
export const reducer = createReducer(
initialState,
on(loginSuccess, (state, action) => {
return {
...state,
loginInfo: action.loginInfo
};
}),
on(logoutSuccess, (state, action) => {
return {
...initialState
};
})
);