Base générale d'UI
This commit is contained in:
7
client/src/store/selectors/flags.js
Normal file
7
client/src/store/selectors/flags.js
Normal file
@ -0,0 +1,7 @@
|
||||
export function selectFlagsIsLoading(state, ...actionPrefixes) {
|
||||
const { actions } = state.flags;
|
||||
return actionPrefixes.reduce((isLoading, prefix) => {
|
||||
if (!(prefix in actions)) return isLoading;
|
||||
return isLoading || actions[prefix].isLoading;
|
||||
}, false);
|
||||
};
|
Reference in New Issue
Block a user