mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix disable skeleton if state is failed
This commit is contained in:
@@ -538,10 +538,11 @@ const Board = () => {
|
|||||||
<Tooltip id="tooltip" className="tooltip" />
|
<Tooltip id="tooltip" className="tooltip" />
|
||||||
<BoardForm selectedStyle={selectedStyle}>
|
<BoardForm selectedStyle={selectedStyle}>
|
||||||
<div className="board">
|
<div className="board">
|
||||||
{feed.length < 1 ? (
|
{subplebbit?.state === "failed" ? (
|
||||||
<PostLoader />
|
null
|
||||||
) : (
|
) : (
|
||||||
<Virtuoso
|
feed.length > 1 ? (
|
||||||
|
<Virtuoso
|
||||||
increaseViewportBy={2000}
|
increaseViewportBy={2000}
|
||||||
data={selectedFeed}
|
data={selectedFeed}
|
||||||
itemContent={(index, thread) => {
|
itemContent={(index, thread) => {
|
||||||
@@ -1172,7 +1173,8 @@ const Board = () => {
|
|||||||
endReached={tryLoadMore}
|
endReached={tryLoadMore}
|
||||||
useWindowScroll={true}
|
useWindowScroll={true}
|
||||||
components={{ Footer: hasMore ? () => <PostLoader /> : null }}
|
components={{ Footer: hasMore ? () => <PostLoader /> : null }}
|
||||||
/>
|
/>
|
||||||
|
) : (<PostLoader />)
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</BoardForm>
|
</BoardForm>
|
||||||
|
|||||||
@@ -452,9 +452,10 @@ const Catalog = () => {
|
|||||||
</TopBar>
|
</TopBar>
|
||||||
<Tooltip id="tooltip" className="tooltip" />
|
<Tooltip id="tooltip" className="tooltip" />
|
||||||
<Threads selectedStyle={selectedStyle}>
|
<Threads selectedStyle={selectedStyle}>
|
||||||
{feed.length < 1 ? (
|
{subplebbit?.state === "failed" ? (
|
||||||
<CatalogLoader />
|
null
|
||||||
) : (
|
) : (
|
||||||
|
feed.length > 1 ? (
|
||||||
<InfiniteScroll
|
<InfiniteScroll
|
||||||
pageStart={0}
|
pageStart={0}
|
||||||
loadMore={tryLoadMore}
|
loadMore={tryLoadMore}
|
||||||
@@ -517,7 +518,8 @@ const Catalog = () => {
|
|||||||
</Link>
|
</Link>
|
||||||
)})}
|
)})}
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
)}
|
) : (<CatalogLoader />)
|
||||||
|
)}
|
||||||
</Threads>
|
</Threads>
|
||||||
<Footer selectedStyle={selectedStyle}>
|
<Footer selectedStyle={selectedStyle}>
|
||||||
<Break id="break" selectedStyle={selectedStyle} style={{
|
<Break id="break" selectedStyle={selectedStyle} style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user