member_webapp/@overflow/member/store/container/modify/member-modify.state.ts
crusader 1d0ac6b572 ing
2018-05-28 16:51:33 +09:00

24 lines
560 B
TypeScript

import { Selector, createSelector } from '@ngrx/store';
import { RESTClientError } from '@loafer/ng-rest';
import { Member } from '@overflow/commons-typescript/model/member';
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),
};
}