You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
479 B
13 lines
479 B
import { createSelector } from 'reselect'
|
|
import values from 'lodash/values'
|
|
|
|
import { AppState } from '../types'
|
|
|
|
export const getNotifications = (state: AppState) => state.notifications
|
|
export const getRequests = (state: AppState) => state.requests
|
|
|
|
export const getFetching = createSelector(getRequests, requests => {
|
|
return values(requests).reduce((fetching, request) => fetching || request.fetching, false)
|
|
})
|
|
|
|
export const getConfig = (state: AppState) => state.config
|