fix(skills): show loading indicator when refreshing discovery list

Use isFetching instead of just isLoading to show the loading spinner.
isLoading is only true on initial load, while isFetching is true
during any fetch operation including refetch.
This commit is contained in:
Jason
2026-01-02 23:51:03 +08:00
parent 4dc59dff21
commit 47aa4c6bee
+2 -1
View File
@@ -54,6 +54,7 @@ export const SkillsPage = forwardRef<SkillsPageHandle, SkillsPageProps>(
const {
data: discoverableSkills,
isLoading: loadingDiscoverable,
isFetching: fetchingDiscoverable,
refetch: refetchDiscoverable,
} = useDiscoverableSkills();
const { data: installedSkills } = useInstalledSkills();
@@ -86,7 +87,7 @@ export const SkillsPage = forwardRef<SkillsPageHandle, SkillsPageProps>(
});
}, [discoverableSkills, installedDirs]);
const loading = loadingDiscoverable;
const loading = loadingDiscoverable || fetchingDiscoverable;
useImperativeHandle(ref, () => ({
refresh: () => {