7 lines
283 B
TypeScript
7 lines
283 B
TypeScript
|
export function selectFlagsIsLoading(state: any, ...actionPrefixes: any[]) {
|
||
|
const { actions } = state.flags;
|
||
|
return actionPrefixes.reduce((isLoading, prefix) => {
|
||
|
if (!(prefix in actions)) return isLoading;
|
||
|
return isLoading || actions[prefix].isLoading;
|
||
|
}, false);
|
||
|
};
|