File size: 424 Bytes
ab2ded1
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import { getOneNamespaceEffectsLoading } from '@/utils/store-util';
import { useSelector } from 'umi';

// Get the loading status of given effects under a certain namespace
export const useOneNamespaceEffectsLoading = (
  namespace: string,
  effectNames: Array<string>,
) => {
  const effects = useSelector((state: any) => state.loading.effects);
  return getOneNamespaceEffectsLoading(namespace, effects, effectNames);
};