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);
|
setCurrentPage((prevPage) => prevPage + 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (fetcher.state === "loading") {
|
if (currentPage) {
|
||||||
return <div>Loading...</div>;
|
if (fetcher.state === "loading") {
|
||||||
}
|
return <div>Loading...</div>;
|
||||||
|
}
|
||||||
|
|
||||||
if (!fetcher.data) {
|
if (!fetcher.data) {
|
||||||
return <div>Failed to load</div>;
|
return <div>Failed to load</div>;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue