ref: Refactoring

This commit is contained in:
Maksim Eltyshev
2022-08-04 13:31:14 +02:00
parent aa4723d7fe
commit 3f8216dca8
189 changed files with 3781 additions and 3486 deletions
+25
View File
@@ -0,0 +1,25 @@
import { createSelector } from 'redux-orm';
import orm from '../orm';
export const makeSelectProjectManagerById = () =>
createSelector(
orm,
(_, id) => id,
({ ProjectManager }, id) => {
const projectManagerModel = ProjectManager.withId(id);
if (!projectManagerModel) {
return projectManagerModel;
}
return projectManagerModel.ref;
},
);
export const selectProjectManagerById = makeSelectProjectManagerById();
export default {
makeSelectProjectManagerById,
selectProjectManagerById,
};