Files
ohif-viewer/src/connectedComponents/ConnectedToolbarRow.js
T

34 lines
800 B
JavaScript
Raw Normal View History

2019-05-31 11:55:44 -04:00
import {
setLeftSidebarOpen,
setRightSidebarOpen,
} from './../store/layout/actions.js';
import ToolbarRow from './ToolbarRow';
2019-05-31 11:55:44 -04:00
import { connect } from 'react-redux';
2019-06-17 14:20:32 -04:00
import { getActiveContexts } from './../store/layout/selectors.js';
const mapStateToProps = state => {
2019-05-29 08:39:54 -04:00
return {
2019-06-17 14:20:32 -04:00
activeContexts: getActiveContexts(state),
2019-05-29 08:39:54 -04:00
leftSidebarOpen: state.ui.leftSidebarOpen,
rightSidebarOpen: state.ui.rightSidebarOpen,
};
};
const mapDispatchToProps = dispatch => {
2019-05-29 08:39:54 -04:00
return {
setLeftSidebarOpen: state => {
dispatch(setLeftSidebarOpen(state));
},
setRightSidebarOpen: state => {
dispatch(setRightSidebarOpen(state));
},
};
};
const ConnectedToolbarRow = connect(
2019-05-29 08:39:54 -04:00
mapStateToProps,
mapDispatchToProps
)(ToolbarRow);
export default ConnectedToolbarRow;