Commit 8354d08a authored by Florent Chehab's avatar Florent Chehab
Browse files

Loading currencies added

parent 9936114a
......@@ -22,12 +22,12 @@ import MyComponent from './MyComponent'
// import route Components here
import {
BrowserRouter as Router,
Route,
} from 'react-router-dom';
import {
countriesFetchData,
currenciesFetchData,
} from '../generated/actions';
......@@ -174,14 +174,16 @@ App.propTypes = {
const mapStateToProps = (state) => {
return {
countries: state.countries
countries: state.countries,
currencies: state.currencies
}
};
const mapDispatchToProps = (dispatch) => {
return {
fetchData: {
countries: () => dispatch(countriesFetchData())
countries: () => dispatch(countriesFetchData()),
currencies: () => dispatch(currenciesFetchData()),
}
};
};
......
......@@ -5,7 +5,8 @@ import {
mainCampusesReducers,
countriesReducers,
countriesElReducers,
universitiesElReducers
universitiesElReducers,
currenciesReducers,
} from '../generated/combinedReducers';
import {
......@@ -21,6 +22,7 @@ const rootReducer = combineReducers({
countriesEl: countriesElReducers,
universities: universitiesReducers,
universitiesEl: universitiesElReducers,
currencies: currenciesReducers,
mainCampuses: mainCampusesReducers,
app: appReducers
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment