mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
15 lines
418 B
TypeScript
15 lines
418 B
TypeScript
// @ts-nocheck
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
export const withDashboardSidebar = (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);
|
|
}
|