diff --git a/src/screens/Library.tsx b/src/screens/Library.tsx index 913c0e39..53b97541 100644 --- a/src/screens/Library.tsx +++ b/src/screens/Library.tsx @@ -35,7 +35,7 @@ export default function Library() { const { options } = useLibraryOptionsContext(); const [lastLibraryUpdate, setLastLibraryUpdate] = useState(Date.now()); - const { data: tabsData, error: tabsError, isLoading } = requestManager.useGetCategories(); + const { data: tabsData, error: tabsError, isLoading: areCategoriesLoading } = requestManager.useGetCategories(); const tabs = tabsData ?? []; const librarySize = useMemo(() => tabs.map((tab) => tab.size).reduce((prev, curr) => prev + curr, 0), [tabs]); @@ -55,7 +55,7 @@ export default function Library() { const navBarTitle = ( {title} - {mangaLoading || !options.showTabSize ? null : } + {areCategoriesLoading || !options.showTabSize ? null : } ); setTitle(navBarTitle, title); @@ -70,7 +70,7 @@ export default function Library() { setTitle(''); setAction(null); }; - }, [t, librarySize, mangaLoading, options]); + }, [t, librarySize, areCategoriesLoading, options]); const handleTabChange = (newTab: number) => { setTabSearchParam(newTab === 0 ? undefined : newTab); @@ -85,7 +85,7 @@ export default function Library() { ); } - if (isLoading) { + if (areCategoriesLoading) { return ; }