member_webapp/@overflow/shared/auth/store/auth/auth.state.ts

20 lines
551 B
TypeScript
Raw Normal View History

2018-05-28 07:51:33 +00:00
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),
};
}