Show loading indicator on page load

When there are 0 parties, show a loading indicator
This commit is contained in:
Justin Edmund 2024-04-22 23:30:15 -07:00
parent a1f556583a
commit 0c50fea18b

View file

@ -144,6 +144,8 @@ const TeamsRoute: React.FC<Props> = ({
} }
const renderInfiniteScroll = ( const renderInfiniteScroll = (
<>
{parties.length === 0 && renderLoading(3)}
<InfiniteScroll <InfiniteScroll
dataLength={parties && parties.length > 0 ? parties.length : 0} dataLength={parties && parties.length > 0 ? parties.length : 0}
next={() => setCurrentPage(currentPage + 1)} next={() => setCurrentPage(currentPage + 1)}
@ -152,6 +154,7 @@ const TeamsRoute: React.FC<Props> = ({
> >
<GridRepCollection>{renderParties()}</GridRepCollection> <GridRepCollection>{renderParties()}</GridRepCollection>
</InfiniteScroll> </InfiniteScroll>
</>
) )
if (context) { if (context) {