2020-04-30 13:02:56 +02:00
|
|
|
export function selectFlagsIsLoading(state: any, ...actionPrefixes: any[]) {
|
2019-12-01 22:12:13 +01:00
|
|
|
const { actions } = state.flags;
|
|
|
|
return actionPrefixes.reduce((isLoading, prefix) => {
|
|
|
|
if (!(prefix in actions)) return isLoading;
|
|
|
|
return isLoading || actions[prefix].isLoading;
|
|
|
|
}, false);
|
|
|
|
};
|