Cleanup
parent
e37f781253
commit
67db90d4b7
|
@ -1,6 +1,5 @@
|
||||||
import React, {PureComponent} from 'react'
|
import React, {PureComponent} from 'react'
|
||||||
import {connect} from 'react-redux'
|
import {connect} from 'react-redux'
|
||||||
import {bindActionCreators} from 'redux'
|
|
||||||
import {ErrorHandling} from 'src/shared/decorators/errors'
|
import {ErrorHandling} from 'src/shared/decorators/errors'
|
||||||
|
|
||||||
import * as actions from 'src/shared/actions/sources'
|
import * as actions from 'src/shared/actions/sources'
|
||||||
|
@ -92,22 +91,16 @@ class ManageSources extends PureComponent<Props> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapStateToProps = ({sources}) => ({
|
const mstp = ({sources}) => ({
|
||||||
sources,
|
sources,
|
||||||
})
|
})
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch => ({
|
const mdtp = {
|
||||||
removeAndLoadSources: bindActionCreators(
|
removeAndLoadSources: actions.removeAndLoadSources,
|
||||||
actions.removeAndLoadSources,
|
fetchKapacitors: actions.fetchKapacitorsAsync,
|
||||||
dispatch
|
setActiveKapacitor: actions.setActiveKapacitorAsync,
|
||||||
),
|
deleteKapacitor: actions.deleteKapacitorAsync,
|
||||||
fetchKapacitors: bindActionCreators(actions.fetchKapacitorsAsync, dispatch),
|
notify: notifyAction,
|
||||||
setActiveKapacitor: bindActionCreators(
|
}
|
||||||
actions.setActiveKapacitorAsync,
|
|
||||||
dispatch
|
|
||||||
),
|
|
||||||
deleteKapacitor: bindActionCreators(actions.deleteKapacitorAsync, dispatch),
|
|
||||||
notify: bindActionCreators(notifyAction, dispatch),
|
|
||||||
})
|
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(ManageSources)
|
export default connect(mstp, mdtp)(ManageSources)
|
||||||
|
|
Loading…
Reference in New Issue