20 lines
551 B
TypeScript
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),
|
|
};
|
|
}
|