mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins Catalog: Fix plugin details page initial flickering (#83896)
fix: wait for the local and remote fetches to fulfill
This commit is contained in:
@@ -84,7 +84,10 @@ export const useLocalFetchStatus = () => {
|
||||
};
|
||||
|
||||
export const useFetchStatus = () => {
|
||||
const isLoading = useSelector(selectIsRequestPending(fetchAll.typePrefix));
|
||||
const isAllLoading = useSelector(selectIsRequestPending(fetchAll.typePrefix));
|
||||
const isLocalLoading = useSelector(selectIsRequestPending('plugins/fetchLocal'));
|
||||
const isRemoteLoading = useSelector(selectIsRequestPending('plugins/fetchRemote'));
|
||||
const isLoading = isAllLoading || isLocalLoading || isRemoteLoading;
|
||||
const error = useSelector(selectRequestError(fetchAll.typePrefix));
|
||||
|
||||
return { isLoading, error };
|
||||
|
||||
Reference in New Issue
Block a user