mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-14 20:00:33 +00:00
21 lines
549 B
TypeScript
21 lines
549 B
TypeScript
// @ts-nocheck
|
|
import { connect } from 'react-redux';
|
|
import {
|
|
isDialogOpenFactory,
|
|
getDialogPayloadFactory,
|
|
} from '@/store/dashboard/dashboard.selectors';
|
|
|
|
export default (mapState) => {
|
|
const isDialogOpen = isDialogOpenFactory();
|
|
const getDialogPayload = getDialogPayloadFactory();
|
|
|
|
const mapStateToProps = (state, props) => {
|
|
const mapped = {
|
|
isOpen: isDialogOpen(state, props),
|
|
payload: getDialogPayload(state, props),
|
|
};
|
|
return mapState ? mapState(mapped) : mapped;
|
|
};
|
|
return connect(mapStateToProps);
|
|
};
|