mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
refactoring: setup wizard pages with simple architecture.
This commit is contained in:
@@ -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,
|
||||
);
|
||||
Reference in New Issue
Block a user