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';
|
2018-09-20 11:58:47 -07:00
|
|
|
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';
|
2018-10-03 10:11:44 -07:00
|
|
|
import users, { UsersState, INITIAL_STATE as usersInitialState } from 'modules/users';
|
2019-01-30 09:59:15 -08:00
|
|
|
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;
|
2018-09-20 11:58:47 -07:00
|
|
|
create: CreateState;
|
2018-10-03 10:11:44 -07:00
|
|
|
users: UsersState;
|
2018-10-01 14:01:20 -07:00
|
|
|
auth: AuthState;
|
2019-01-30 09:59:15 -08:00
|
|
|
rfps: RFPState;
|
2018-11-13 08:07:09 -08:00
|
|
|
router: RouterState;
|
2018-09-10 09:55:26 -07:00
|
|
|
}
|
|
|
|
|
2019-01-30 09:59:15 -08:00
|
|
|
export const combineInitialState: Omit<AppState, 'router'> = {
|
2018-09-10 09:55:26 -07:00
|
|
|
proposal: proposalInitialState,
|
2018-09-20 11:58:47 -07:00
|
|
|
create: createInitialState,
|
2018-10-03 10:11:44 -07:00
|
|
|
users: usersInitialState,
|
2018-10-01 14:01:20 -07:00
|
|
|
auth: authInitialState,
|
2019-01-30 09:59:15 -08:00
|
|
|
rfps: rfpsInitialState,
|
2018-09-10 09:55:26 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
export default combineReducers<AppState>({
|
|
|
|
proposal,
|
2018-09-20 11:58:47 -07:00
|
|
|
create,
|
2018-10-03 10:11:44 -07:00
|
|
|
users,
|
2019-01-30 09:59:15 -08:00
|
|
|
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
|
|
|
});
|