fix disable skeleton if state is failed

This commit is contained in:
Tom
2023-05-09 16:30:02 +02:00
parent 2aff229997
commit 4d43b190df
2 changed files with 11 additions and 7 deletions
+6 -4
View File
@@ -538,10 +538,11 @@ const Board = () => {
<Tooltip id="tooltip" className="tooltip" />
<BoardForm selectedStyle={selectedStyle}>
<div className="board">
{feed.length < 1 ? (
<PostLoader />
{subplebbit?.state === "failed" ? (
null
) : (
<Virtuoso
feed.length > 1 ? (
<Virtuoso
increaseViewportBy={2000}
data={selectedFeed}
itemContent={(index, thread) => {
@@ -1172,7 +1173,8 @@ const Board = () => {
endReached={tryLoadMore}
useWindowScroll={true}
components={{ Footer: hasMore ? () => <PostLoader /> : null }}
/>
/>
) : (<PostLoader />)
)}
</div>
</BoardForm>