mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-23 00:00:31 +00:00
20 lines
534 B
TypeScript
20 lines
534 B
TypeScript
import { connect } from 'react-redux';
|
|
import {
|
|
isDrawerOpenFactory,
|
|
getDrawerPayloadFactory,
|
|
} from '@/store/dashboard/dashboard.selectors';
|
|
|
|
export default (mapState) => {
|
|
const isDrawerOpen = isDrawerOpenFactory();
|
|
const getDrawerPayload = getDrawerPayloadFactory();
|
|
|
|
const mapStateToProps = (state, props) => {
|
|
const mapped = {
|
|
isOpen: isDrawerOpen(state, props),
|
|
payload: getDrawerPayload(state, props),
|
|
};
|
|
return mapState ? mapState(mapped) : mapped;
|
|
};
|
|
return connect(mapStateToProps);
|
|
};
|