member_webapp/@overflow/member/store/container/signup/member-signup.state.ts

21 lines
490 B
TypeScript
Raw Normal View History

2018-05-28 07:51:33 +00:00
import { Selector, createSelector } from '@ngrx/store';
import { RESTClientError } from '@loafer/ng-rest';
export interface State {
pending: boolean;
error: RESTClientError;
}
export const initialState: State = {
pending: false,
error: null,
};
export function getSelectors(selector: Selector<any, State>) {
return {
selectPending: createSelector(selector, (state: State) => state.pending),
selectError: createSelector(selector, (state: State) => state.error),
};
}