ragflow / web /src /hooks /storeHooks.ts
balibabu
feat: remove loading from model and use DvaModel instead of redundant types such as kAModelType (#47)
362ec6c
raw
history blame
424 Bytes
import { getOneNamespaceEffectsLoading } from '@/utils/stroreUtil';
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);
};