mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
feat: remove loading from model and use DvaModel instead of redundant types such as kAModelType (#47)
* feat: use DvaModel instead of redundant types such as kAModelType * feat: set the type for registerServer * feat: remove loading from model
This commit is contained in:
11
web/src/hooks/storeHooks.ts
Normal file
11
web/src/hooks/storeHooks.ts
Normal file
@ -0,0 +1,11 @@
|
||||
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);
|
||||
};
|
||||
Reference in New Issue
Block a user