Prevent white screen in Updates page (#383)

This commit is contained in:
蓝云Reyes
2023-06-23 03:40:41 +08:00
committed by GitHub
parent ed9c51cd37
commit 5d9bc5474c

View File

@@ -140,10 +140,6 @@ const Updates: React.FC = () => {
setAction(null);
}, [t]);
if (!isLoading && updateEntries.length === 0) {
return <EmptyView message={t('updates.error.label.no_updates_available')} />;
}
const downloadForChapter = (chapter: IChapter) => {
const { index, mangaId } = chapter;
return queue.find((q) => index === q.chapterIndex && mangaId === q.mangaId);
@@ -161,6 +157,10 @@ const Updates: React.FC = () => {
setPages(loadedPages + 1);
}, [hasNextPage, loadedPages]);
if (!isLoading && updateEntries.length === 0) {
return <EmptyView message={t('updates.error.label.no_updates_available')} />;
}
return (
<StyledGroupedVirtuoso
style={{