aboutsummaryrefslogtreecommitdiff
path: root/src/services/selectors.js
blob: f9942d4792492d21822e81963e8e45fbd2872052 (plain)
1
2
3
4
5
6
7
8
9
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}`));
};