Fix Bad messages in Library Appbar search (#70)

This commit is contained in:
Sascha Hahne
2021-11-10 09:44:27 +01:00
committed by GitHub
parent ce8fcb228d
commit 1b0c277188

View File

@@ -53,9 +53,10 @@ export default function LibraryMangaGrid(props: IMangaGridProps) {
mangas, isLoading, hasNextPage, lastPageNum, setLastPageNum, message,
} = props;
const { active } = useLibraryOptions();
const { active, query } = useLibraryOptions();
const filteredManga = filterManga(mangas);
const showFilteredOutMessage = active && filteredManga.length === 0 && mangas.length > 0;
const showFilteredOutMessage = (active || query)
&& filteredManga.length === 0 && mangas.length > 0;
return (
<MangaGrid