refactoring: setup wizard pages with simple architecture.

This commit is contained in:
Ahmed Bouhuolia
2020-10-11 20:35:01 +02:00
parent b98ecb7569
commit e15a48dcdd
29 changed files with 608 additions and 513 deletions

View File

@@ -2,17 +2,17 @@ import { createSelector } from '@reduxjs/toolkit';
const oragnizationByTenantIdSelector = (state, props) => state.organizations[props.tenantId];
const organizationByIdSelector = (state, props) => state.organizations.byOrganizationId[props.organizationId];
const organizationsDataSelector = (state, props) => state.organizations.data;
export const getOrganizationByOrgIdFactory = () => createSelector(
organizationByIdSelector,
(organization) => {
return organization;
},
organizationsDataSelector,
(organizationId, organizationsData) => {
return organizationsData[organizationId];
}
);
export const getOrganizationByTenantIdFactory = () => createSelector(
oragnizationByTenantIdSelector,
(organization) => {
return organization;
}
)
(organization) => organization,
);