zcash-grant-system/frontend/client/store/reducers.tsx

38 lines
1.1 KiB
TypeScript
Raw Normal View History

2019-02-04 12:45:20 -08:00
import { combineReducers } from 'redux';
2018-11-13 08:07:09 -08:00
import { connectRouter, RouterState } from 'connected-react-router';
2018-09-10 09:55:26 -07:00
import proposal, {
ProposalState,
INITIAL_STATE as proposalInitialState,
} from 'modules/proposals';
import create, { CreateState, INITIAL_STATE as createInitialState } from 'modules/create';
2019-02-04 12:45:20 -08:00
import auth, { AuthState, INITIAL_STATE as authInitialState } from 'modules/auth';
import users, { UsersState, INITIAL_STATE as usersInitialState } from 'modules/users';
import rfps, { RFPState, INITIAL_STATE as rfpsInitialState } from 'modules/rfps';
2018-11-13 08:07:09 -08:00
import history from './history';
2018-09-10 09:55:26 -07:00
export interface AppState {
proposal: ProposalState;
create: CreateState;
users: UsersState;
auth: AuthState;
rfps: RFPState;
2018-11-13 08:07:09 -08:00
router: RouterState;
2018-09-10 09:55:26 -07:00
}
export const combineInitialState: Omit<AppState, 'router'> = {
2018-09-10 09:55:26 -07:00
proposal: proposalInitialState,
create: createInitialState,
users: usersInitialState,
auth: authInitialState,
rfps: rfpsInitialState,
2018-09-10 09:55:26 -07:00
};
export default combineReducers<AppState>({
proposal,
create,
users,
rfps,
2019-02-04 12:45:20 -08:00
auth,
2018-11-13 08:07:09 -08:00
router: connectRouter(history),
2018-09-10 09:55:26 -07:00
});