2018-05-28 07:51:33 +00:00
|
|
|
import {
|
|
|
|
createSelector,
|
|
|
|
createFeatureSelector,
|
|
|
|
} from '@ngrx/store';
|
|
|
|
|
|
|
|
import { MODULE } from '../auth.constant';
|
|
|
|
|
2018-06-01 09:45:28 +00:00
|
|
|
import * as AuthStore from './auth';
|
2018-05-28 07:51:33 +00:00
|
|
|
|
|
|
|
export interface State {
|
2018-06-01 09:45:28 +00:00
|
|
|
auth_container: AuthStore.State;
|
2018-05-28 07:51:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const REDUCERS = {
|
2018-06-01 09:45:28 +00:00
|
|
|
auth_container: AuthStore.reducer,
|
2018-05-28 07:51:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const EFFECTS = [
|
|
|
|
];
|
|
|
|
|
|
|
|
export const selectState = createFeatureSelector<State>(MODULE.name);
|
|
|
|
|
2018-06-01 09:45:28 +00:00
|
|
|
export const AuthSelector = AuthStore.getSelectors(createSelector(
|
2018-05-28 07:51:33 +00:00
|
|
|
selectState,
|
|
|
|
(state: State) => state.auth_container
|
|
|
|
));
|