BC-5 fix: general tab of preferences form submitting.

This commit is contained in:
a.bouhuolia
2021-09-04 18:49:01 +02:00
parent d6d6fefd1f
commit 11df54d4ed
25 changed files with 251 additions and 131 deletions

View File

@@ -1,12 +1,16 @@
import { connect } from 'react-redux';
import { getCurrentOrganizationFactory } from '../../store/authentication/authentication.selectors';
export default (mapState) => {
const getCurrentOrganization = getCurrentOrganizationFactory();
const mapStateToProps = (state, props) => {
const mapped = {
organizationTenantId: state.authentication.organizationId,
organizationId: state.authentication.organization,
organization: getCurrentOrganization(state, props),
};
return (mapState) ? mapState(mapped, state, props) : mapped;
return mapState ? mapState(mapped, state, props) : mapped;
};
return connect(mapStateToProps);
};
};