21 lines
477 B
TypeScript
Raw Normal View History

2019-09-24 09:23:30 +09:00
import { Selector, createSelector } from '@ngrx/store';
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
2019-09-18 15:02:21 +09:00
// tslint:disable-next-line: no-empty-interface
2019-09-24 09:23:30 +09:00
export interface State {
loginInfo: LoginResponse | null;
}
2019-09-18 15:02:21 +09:00
2019-09-24 09:23:30 +09:00
export const initialState: State = {
loginInfo: null
};
2019-09-18 15:02:21 +09:00
export function selectors<S>(selector: Selector<any, State>) {
2019-09-24 09:23:30 +09:00
return {
loginInfo: createSelector(
selector,
(state: State) => state.loginInfo
)
};
2019-09-18 15:02:21 +09:00
}