ragflow / web /src /hooks /store-hooks.ts
zxsipola123456's picture
Upload 769 files
ab2ded1 verified
raw
history blame contribute delete
424 Bytes
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);
};