mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
25 lines
746 B
TypeScript
25 lines
746 B
TypeScript
// @ts-nocheck
|
|
import {connect} from 'react-redux';
|
|
import {compose} from '@/utils';
|
|
|
|
import { withDashboardActions } from '@/containers/Dashboard/withDashboardActions';
|
|
import { withResourceDetail } from '@/containers/Resources/withResourceDetails';
|
|
import { withViewsActions } from '@/containers/Views/withViewsActions';
|
|
import { withViewsDetails } from '@/containers/Views/withViewDetails';
|
|
|
|
const mapStateToProps = (state, ownProps) => {
|
|
return {
|
|
resourceName: ownProps.viewId ?
|
|
ownProps.viewMeta.resource?.name : ownProps.resourceName,
|
|
};
|
|
};
|
|
|
|
const viewFormConnect = connect(mapStateToProps);
|
|
|
|
export default compose(
|
|
withDashboardActions,
|
|
withViewsActions,
|
|
withViewsDetails,
|
|
viewFormConnect,
|
|
withResourceDetail(),
|
|
); |