fix loading state of empty feed

This commit is contained in:
plebeius.eth
2023-07-06 13:14:20 +02:00
parent 02ce0a5474
commit 87fcc80898
6 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -806,7 +806,7 @@ const Board = () => {
<Link to={`/p/${selectedAddress}/catalog`} onClick={()=> {window.scrollTo(0, 0)}}>Catalog</Link>
]
</div>
{feed.length > 0 ? (
{subplebbit?.state === "succeeded" ? (
<>
<span className="subscribe-button-desktop">
[
@@ -840,7 +840,7 @@ const Board = () => {
{subplebbit?.state === "failed" ? (
null
) : (
feed.length > 0 ? (
feed ? (
<>
{subplebbit.rules ?
<>
@@ -2685,7 +2685,7 @@ const Board = () => {
}}
endReached={tryLoadMore}
useWindowScroll={true}
components={{ Footer: hasMore && feed.length > 0 ? () => <PostLoader /> : null }}
components={{ Footer: hasMore && feed ? () => <PostLoader /> : null }}
/>
</>
) : (<PostLoader />)