From 89b30fc50d5b4dcf92c850dcc2c295b1679ae819 Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Sat, 3 Sep 2022 14:07:34 -0700 Subject: [PATCH] Fix tournaments page loading indicator and turn page size back down --- web/pages/tournaments/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/pages/tournaments/index.tsx b/web/pages/tournaments/index.tsx index c9827f72..1a74e8ea 100644 --- a/web/pages/tournaments/index.tsx +++ b/web/pages/tournaments/index.tsx @@ -223,13 +223,16 @@ const ImageCarousel = (props: { images: MarketImage[]; url: string }) => { const MarketCarousel = (props: { slug: string }) => { const { slug } = props const q = contractsByGroupSlugQuery(slug) - const { allItems, getNext, isLoading } = usePagination({ q, pageSize: 12 }) - return isLoading ? ( + const { allItems, getNext } = usePagination({ q, pageSize: 6 }) + const items = allItems() + + // todo: would be nice to have indicator somewhere when it loads next page + return items.length === 0 ? ( ) : (
- {allItems().map((m) => ( + {items.map((m) => (