add pagination to library and fix some prettier issues (#237)

Co-authored-by: akxer <>
This commit is contained in:
akabhirav
2023-02-12 20:43:41 +05:30
committed by GitHub
parent ad9a12b2ec
commit aaedbb7be9
5 changed files with 37 additions and 31 deletions

View File

@@ -51,10 +51,6 @@ export default function Library() {
};
}, []);
// a hack so MangaGrid doesn't stop working. I won't change it in case
// if I do manga pagination for library..
const [lastPageNum, setLastPageNum] = useState<number>(1);
const handleTabChange = (newTab: number) => {
setTabSearchParam(newTab === 0 ? undefined : newTab);
};
@@ -76,9 +72,6 @@ export default function Library() {
<LibraryMangaGrid
mangas={mangas}
lastLibraryUpdate={lastLibraryUpdate}
hasNextPage={false}
lastPageNum={lastPageNum}
setLastPageNum={setLastPageNum}
message="Your Library is empty"
isLoading={activeTab != null && mangaLoading}
/>
@@ -117,9 +110,6 @@ export default function Library() {
<LibraryMangaGrid
mangas={mangas}
lastLibraryUpdate={lastLibraryUpdate}
hasNextPage={false}
lastPageNum={lastPageNum}
setLastPageNum={setLastPageNum}
message="Category is Empty"
isLoading={mangaLoading}
/>

View File

@@ -211,7 +211,7 @@ const SearchAll: React.FC = () => {
hasNextPage={false}
lastPageNum={lastPageNum}
setLastPageNum={setLastPageNum}
horisontal
horizontal
noFaces
message={fetched[id] ? 'No manga was found!' : undefined}
inLibraryIndicator