diff --git a/src/constants/common.ts b/src/constants/common.ts new file mode 100644 index 0000000000000000000000000000000000000000..ee434dc7c1ebfa6b43b4f2b6004ef5d042a41861 --- /dev/null +++ b/src/constants/common.ts @@ -0,0 +1 @@ +export const SIZE_OF_EMPTY_ARRAY = 0; diff --git a/src/redux/chemicals/chemicals.selectors.ts b/src/redux/chemicals/chemicals.selectors.ts index d0cdd9b7caf2a7ec413b62fa2aba35b202160697..0fef7a3275e97b1a501223003e06e4cfe05f3f23 100644 --- a/src/redux/chemicals/chemicals.selectors.ts +++ b/src/redux/chemicals/chemicals.selectors.ts @@ -1,8 +1,7 @@ +import { SIZE_OF_EMPTY_ARRAY } from '@/constants/common'; import { rootSelector } from '@/redux/root/root.selectors'; import { createSelector } from '@reduxjs/toolkit'; -const SIZE_OF_EMPTY_ARRAY = 0; - export const chemicalsSelector = createSelector(rootSelector, state => state.chemicals); export const loadingChemicalsStatusSelector = createSelector( diff --git a/src/redux/drugs/drugs.selectors.ts b/src/redux/drugs/drugs.selectors.ts index cca30ff272f61d3ae75d24ed4a21786ffe37e28b..7a1d3eacacbf0fee4cd7093f4c0255f4c910af51 100644 --- a/src/redux/drugs/drugs.selectors.ts +++ b/src/redux/drugs/drugs.selectors.ts @@ -1,8 +1,7 @@ +import { SIZE_OF_EMPTY_ARRAY } from '@/constants/common'; import { rootSelector } from '@/redux/root/root.selectors'; import { createSelector } from '@reduxjs/toolkit'; -const SIZE_OF_EMPTY_ARRAY = 0; - export const drugsSelector = createSelector(rootSelector, state => state.drugs); export const loadingDrugsStatusSelector = createSelector(drugsSelector, state => state.loading); diff --git a/src/redux/mirnas/mirnas.selectors.ts b/src/redux/mirnas/mirnas.selectors.ts index 59af89ecd6b169ef1b9de2f1bd4467a56945af9e..51ac4dea078d807985a399bede164e6782e7ae9b 100644 --- a/src/redux/mirnas/mirnas.selectors.ts +++ b/src/redux/mirnas/mirnas.selectors.ts @@ -1,8 +1,7 @@ +import { SIZE_OF_EMPTY_ARRAY } from '@/constants/common'; import { rootSelector } from '@/redux/root/root.selectors'; import { createSelector } from '@reduxjs/toolkit'; -const SIZE_OF_EMPTY_ARRAY = 0; - export const mirnasSelector = createSelector(rootSelector, state => state.mirnas); export const loadingMirnasStatusSelector = createSelector(mirnasSelector, state => state.loading);