Show loading indicator on page load
When there are 0 parties, show a loading indicator
This commit is contained in:
parent
a1f556583a
commit
0c50fea18b
1 changed files with 11 additions and 8 deletions
|
|
@ -144,14 +144,17 @@ const TeamsRoute: React.FC<Props> = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
const renderInfiniteScroll = (
|
const renderInfiniteScroll = (
|
||||||
<InfiniteScroll
|
<>
|
||||||
dataLength={parties && parties.length > 0 ? parties.length : 0}
|
{parties.length === 0 && renderLoading(3)}
|
||||||
next={() => setCurrentPage(currentPage + 1)}
|
<InfiniteScroll
|
||||||
hasMore={totalPages > currentPage}
|
dataLength={parties && parties.length > 0 ? parties.length : 0}
|
||||||
loader={renderLoading(3)}
|
next={() => setCurrentPage(currentPage + 1)}
|
||||||
>
|
hasMore={totalPages > currentPage}
|
||||||
<GridRepCollection>{renderParties()}</GridRepCollection>
|
loader={renderLoading(3)}
|
||||||
</InfiniteScroll>
|
>
|
||||||
|
<GridRepCollection>{renderParties()}</GridRepCollection>
|
||||||
|
</InfiniteScroll>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
if (context) {
|
if (context) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue