2019-05-31 11:55:44 -04:00
|
|
|
import {
|
|
|
|
|
setLeftSidebarOpen,
|
|
|
|
|
setRightSidebarOpen,
|
|
|
|
|
} from './../store/layout/actions.js';
|
|
|
|
|
|
2018-12-31 13:26:38 +01:00
|
|
|
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';
|
2019-02-24 15:26:50 +01:00
|
|
|
|
2018-12-31 13:26:38 +01:00
|
|
|
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,
|
|
|
|
|
};
|
2018-12-31 13:26:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => {
|
2019-05-29 08:39:54 -04:00
|
|
|
return {
|
|
|
|
|
setLeftSidebarOpen: state => {
|
|
|
|
|
dispatch(setLeftSidebarOpen(state));
|
|
|
|
|
},
|
|
|
|
|
setRightSidebarOpen: state => {
|
|
|
|
|
dispatch(setRightSidebarOpen(state));
|
|
|
|
|
},
|
|
|
|
|
};
|
2018-12-31 13:26:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const ConnectedToolbarRow = connect(
|
2019-05-29 08:39:54 -04:00
|
|
|
mapStateToProps,
|
|
|
|
|
mapDispatchToProps
|
2018-12-31 13:26:38 +01:00
|
|
|
)(ToolbarRow);
|
|
|
|
|
|
|
|
|
|
export default ConnectedToolbarRow;
|