|
|
@ -19,25 +19,24 @@ const Conserve = (props) => { |
|
|
|
setLoading(false) |
|
|
|
setRoadData(res.payload.data || {}) |
|
|
|
}) |
|
|
|
dispatch(getHighways()).then(res =>{ |
|
|
|
dispatch(getHighways()).then(res => { |
|
|
|
setHighwaysData(res.payload.data || []) |
|
|
|
}) |
|
|
|
dispatch(getRoadMaintenances()).then(res =>{ |
|
|
|
dispatch(getRoadMaintenances()).then(res => { |
|
|
|
setRoadMaintenances(res.payload.data || []) |
|
|
|
}) |
|
|
|
}, []) |
|
|
|
|
|
|
|
return ( |
|
|
|
<div style={{ width: '100%', height: '100%', }}> |
|
|
|
<div style={{ display: 'flex', width: '100%', height: '100%', justifyContent: 'space-between' }}> |
|
|
|
<Left roadData={roadData} loading={loading} /> |
|
|
|
<Right highwaysData={highwaysData} roadMaintenances={roadMaintenances}/> |
|
|
|
<div style={{ width: '100%', height: '100%', }}> |
|
|
|
<div style={{ display: 'flex', width: '100%', height: '100%', justifyContent: 'space-between' }}> |
|
|
|
<Left roadData={roadData} loading={loading} /> |
|
|
|
<Right highwaysData={highwaysData} roadMaintenances={roadMaintenances} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
) |
|
|
|
} |
|
|
|
function mapStateToProps(state) { |
|
|
|
|
|
|
|
// const { auth } = state;
|
|
|
|
|
|
|
|
return { |
|
|
|