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 = () => {
|
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));
|
const error = useSelector(selectRequestError(fetchAll.typePrefix));
|
||||||
|
|
||||||
return { isLoading, error };
|
return { isLoading, error };
|
||||||
|
|||||||
Reference in New Issue
Block a user