fix chapterFetch loop
This commit is contained in:
@@ -122,8 +122,12 @@ export default function Manga() {
|
|||||||
}
|
}
|
||||||
setChapters(data);
|
setChapters(data);
|
||||||
})
|
})
|
||||||
.then(() => { setFetchedOffline(true); setFetchedOnline(shouldFetchOnline); });
|
.then(() => {
|
||||||
}, [chapters.length, fetchedOffline, chapterUpdateTriggerer]);
|
if (shouldFetchOnline) {
|
||||||
|
setFetchedOnline(true);
|
||||||
|
} else setFetchedOffline(true);
|
||||||
|
});
|
||||||
|
}, [chapters.length, fetchedOnline, fetchedOffline, chapterUpdateTriggerer]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
|
|||||||
Reference in New Issue
Block a user