Prevent white screen in Updates page (#383)
This commit is contained in:
@@ -140,10 +140,6 @@ const Updates: React.FC = () => {
|
|||||||
setAction(null);
|
setAction(null);
|
||||||
}, [t]);
|
}, [t]);
|
||||||
|
|
||||||
if (!isLoading && updateEntries.length === 0) {
|
|
||||||
return <EmptyView message={t('updates.error.label.no_updates_available')} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
const downloadForChapter = (chapter: IChapter) => {
|
const downloadForChapter = (chapter: IChapter) => {
|
||||||
const { index, mangaId } = chapter;
|
const { index, mangaId } = chapter;
|
||||||
return queue.find((q) => index === q.chapterIndex && mangaId === q.mangaId);
|
return queue.find((q) => index === q.chapterIndex && mangaId === q.mangaId);
|
||||||
@@ -161,6 +157,10 @@ const Updates: React.FC = () => {
|
|||||||
setPages(loadedPages + 1);
|
setPages(loadedPages + 1);
|
||||||
}, [hasNextPage, loadedPages]);
|
}, [hasNextPage, loadedPages]);
|
||||||
|
|
||||||
|
if (!isLoading && updateEntries.length === 0) {
|
||||||
|
return <EmptyView message={t('updates.error.label.no_updates_available')} />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledGroupedVirtuoso
|
<StyledGroupedVirtuoso
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user