diff --git a/src/components/MangaGrid.tsx b/src/components/MangaGrid.tsx index cce67042..d06da71b 100644 --- a/src/components/MangaGrid.tsx +++ b/src/components/MangaGrid.tsx @@ -291,6 +291,10 @@ export const MangaGrid: React.FC = (props) => { const gridHeight = entries[0].target.clientHeight; const isScrollbarVisible = gridHeight > document.documentElement.clientHeight; + if (isLoading) { + return; + } + if (!gridHeight) { return; } @@ -306,7 +310,7 @@ export const MangaGrid: React.FC = (props) => { resizeObserver.observe(gridRef.current); return () => resizeObserver.disconnect(); - }, [loadMore]); + }, [loadMore, isLoading]); const hasNoItems = !isLoading && mangas.length === 0; if (hasNoItems) {