member_webapp/@overflow/member/store/container/signup/member-signup.state.ts
2018-05-29 18:32:22 +09:00

24 lines
634 B
TypeScript

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