richard-loafle 35d9cc6a9b bug fixed
2020-04-03 10:59:44 +09:00

21 lines
403 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,
loginRes: action.res
};
}),
on(logoutSuccess, (state, action) => {
return {
...initialState
};
})
);