summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/machine/BackToRackContainer.js
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/machine/BackToRackContainer.js')
-rw-r--r--opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/machine/BackToRackContainer.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/machine/BackToRackContainer.js b/opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/machine/BackToRackContainer.js
index 24287ab0..46862472 100644
--- a/opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/machine/BackToRackContainer.js
+++ b/opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/machine/BackToRackContainer.js
@@ -1,13 +1,11 @@
-import { connect } from 'react-redux'
+import React from 'react'
+import { useDispatch } from 'react-redux'
import { goDownOneInteractionLevel } from '../../../../../actions/interaction-level'
import BackToRackComponent from '../../../../../components/app/sidebars/topology/machine/BackToRackComponent'
-const mapDispatchToProps = (dispatch) => {
- return {
- onClick: () => dispatch(goDownOneInteractionLevel()),
- }
+const BackToRackContainer = (props) => {
+ const dispatch = useDispatch()
+ return <BackToRackComponent {...props} onClick={() => dispatch(goDownOneInteractionLevel())} />
}
-const BackToRackContainer = connect(undefined, mapDispatchToProps)(BackToRackComponent)
-
export default BackToRackContainer