fix: only check fetcher if we are greater than page 0
This commit is contained in:
parent
b88c14407f
commit
41e3a34ab7
|
@ -50,12 +50,14 @@ const Feed = ({
|
|||
setCurrentPage((prevPage) => prevPage + 1);
|
||||
};
|
||||
|
||||
if (fetcher.state === "loading") {
|
||||
return <div>Loading...</div>;
|
||||
}
|
||||
if (currentPage) {
|
||||
if (fetcher.state === "loading") {
|
||||
return <div>Loading...</div>;
|
||||
}
|
||||
|
||||
if (!fetcher.data) {
|
||||
return <div>Failed to load</div>;
|
||||
if (!fetcher.data) {
|
||||
return <div>Failed to load</div>;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue