22 lines
511 B
TypeScript
Raw Normal View History

2020-01-21 13:32:10 +09:00
import { createReducer, on } from '@ngrx/store';
2019-11-21 10:29:19 +09:00
import { initialState } from './state';
2020-01-21 13:32:10 +09:00
import { selectedGnbMenuIndex } from './actions';
2019-11-21 10:29:19 +09:00
2020-01-21 13:32:10 +09:00
import * as AuthenticationStore from '@app/store/account/authentication';
export const reducer = createReducer(
initialState,
on(selectedGnbMenuIndex, (state, action) => {
return {
...state,
gnbMenuIndex: action.menuIndex
};
}),
on(AuthenticationStore.logoutInitialize, (state, action) => {
return {
...initialState
};
})
);