mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat(Sidebar): Refactoring sidebar menu with feature and permissions abilities control.
This commit is contained in:
13
src/containers/Dashboard/Sidebar/withDashboardSidebar.js
Normal file
13
src/containers/Dashboard/Sidebar/withDashboardSidebar.js
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
export default (mapState) => {
|
||||
const mapStateToProps = (state, props) => {
|
||||
const mapped = {
|
||||
sidebarSubmenuOpen: state.dashboard.sidebarSubmenu.isOpen,
|
||||
sidebarSubmenuId: state.dashboard.sidebarSubmenu.submenuId,
|
||||
};
|
||||
return mapState ? mapState(mapped, state, props) : mapped;
|
||||
};
|
||||
return connect(mapStateToProps);
|
||||
}
|
||||
Reference in New Issue
Block a user