member_webapp/@overflow/shared/auth/store/auth/auth.state.ts
crusader 46c1c55d61 ing
2018-06-01 18:45:28 +09:00

20 lines
551 B
TypeScript

import { Selector, createSelector } from '@ngrx/store';
import { DomainMember } from '@overflow/commons-typescript/model/domain';
export interface State {
signined: boolean;
domainMember: DomainMember | null;
}
export const initialState: State = {
signined: false,
domainMember: null,
};
export function getSelectors<S>(selector: Selector<any, State>) {
return {
selectSignined: createSelector(selector, (state: State) => state.signined),
selectDomainMember: createSelector(selector, (state: State) => state.domainMember),
};
}