aboutsummaryrefslogtreecommitdiff
path: root/src/services/selectors.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/selectors.js')
-rw-r--r--src/services/selectors.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/services/selectors.js b/src/services/selectors.js
new file mode 100644
index 0000000..f9942d4
--- /dev/null
+++ b/src/services/selectors.js
@@ -0,0 +1,10 @@
+import _ from "lodash";
+
+export const createLoadingSelector = actions => state => {
+ return _(actions).some(action => _.get(state, `loading.${action}`));
+};
+
+export const createNotificationSelector = actions => state => {
+ return _(actions)
+ .some(action => _.get(state, `error.${action}`));
+};