in library badge to manga in sources (#156)

* add the in library badge to manga in sources

* other layouts done
This commit is contained in:
robo
2022-03-11 15:54:45 +00:00
committed by GitHub
parent 33c9defdd9
commit 841b945ca5
4 changed files with 52 additions and 14 deletions

View File

@@ -84,12 +84,17 @@ export default function LibraryMangaGrid(props: IMangaGridProps) {
const { active, query } = useLibraryOptions();
const filteredManga = filterManga(mangas);
const sortedManga = sortManga(filteredManga);
const DoneManga = sortedManga.map((ele) => {
// eslint-disable-next-line no-param-reassign
ele.inLibrary = undefined;
return ele;
});
const showFilteredOutMessage = (active || query)
&& filteredManga.length === 0 && mangas.length > 0;
return (
<MangaGrid
mangas={sortedManga}
mangas={DoneManga}
isLoading={isLoading}
hasNextPage={hasNextPage}
lastPageNum={lastPageNum}