Fix tournaments page loading indicator and turn page size back down
This commit is contained in:
parent
9060abde8e
commit
89b30fc50d
|
@ -223,13 +223,16 @@ const ImageCarousel = (props: { images: MarketImage[]; url: string }) => {
|
||||||
const MarketCarousel = (props: { slug: string }) => {
|
const MarketCarousel = (props: { slug: string }) => {
|
||||||
const { slug } = props
|
const { slug } = props
|
||||||
const q = contractsByGroupSlugQuery(slug)
|
const q = contractsByGroupSlugQuery(slug)
|
||||||
const { allItems, getNext, isLoading } = usePagination({ q, pageSize: 12 })
|
const { allItems, getNext } = usePagination({ q, pageSize: 6 })
|
||||||
return isLoading ? (
|
const items = allItems()
|
||||||
|
|
||||||
|
// todo: would be nice to have indicator somewhere when it loads next page
|
||||||
|
return items.length === 0 ? (
|
||||||
<LoadingIndicator className="mt-10" />
|
<LoadingIndicator className="mt-10" />
|
||||||
) : (
|
) : (
|
||||||
<Carousel className="-mx-4 mt-4 sm:-mx-10" loadMore={getNext}>
|
<Carousel className="-mx-4 mt-4 sm:-mx-10" loadMore={getNext}>
|
||||||
<div className="shrink-0 sm:w-6" />
|
<div className="shrink-0 sm:w-6" />
|
||||||
{allItems().map((m) => (
|
{items.map((m) => (
|
||||||
<ContractCard
|
<ContractCard
|
||||||
key={m.id}
|
key={m.id}
|
||||||
contract={m}
|
contract={m}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user