Fix bug (#854)
This commit is contained in:
parent
450b140f5f
commit
59f3936dad
|
@ -104,7 +104,7 @@ export async function listContracts(creatorId: string): Promise<Contract[]> {
|
|||
return snapshot.docs.map((doc) => doc.data())
|
||||
}
|
||||
|
||||
export const contractsByGroupSlugQuery = (slug: string) =>
|
||||
export const tournamentContractsByGroupSlugQuery = (slug: string) =>
|
||||
query(
|
||||
contracts,
|
||||
where('groupSlugs', 'array-contains', slug),
|
||||
|
@ -115,7 +115,8 @@ export const contractsByGroupSlugQuery = (slug: string) =>
|
|||
export async function listContractsByGroupSlug(
|
||||
slug: string
|
||||
): Promise<Contract[]> {
|
||||
const snapshot = await getDocs(contractsByGroupSlugQuery(slug))
|
||||
const q = query(contracts, where('groupSlugs', 'array-contains', slug))
|
||||
const snapshot = await getDocs(q)
|
||||
return snapshot.docs.map((doc) => doc.data())
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import { Col } from 'web/components/layout/col'
|
|||
import { Row } from 'web/components/layout/row'
|
||||
import { Page } from 'web/components/page'
|
||||
import { SEO } from 'web/components/SEO'
|
||||
import { contractsByGroupSlugQuery } from 'web/lib/firebase/contracts'
|
||||
import { tournamentContractsByGroupSlugQuery } from 'web/lib/firebase/contracts'
|
||||
import { getGroup, groupPath } from 'web/lib/firebase/groups'
|
||||
import elon_pic from './_cspi/Will_Elon_Buy_Twitter.png'
|
||||
import china_pic from './_cspi/Chinese_Military_Action_against_Taiwan.png'
|
||||
|
@ -222,7 +222,7 @@ const ImageCarousel = (props: { images: MarketImage[]; url: string }) => {
|
|||
|
||||
const MarketCarousel = (props: { slug: string }) => {
|
||||
const { slug } = props
|
||||
const q = contractsByGroupSlugQuery(slug)
|
||||
const q = tournamentContractsByGroupSlugQuery(slug)
|
||||
const { allItems, getNext } = usePagination({ q, pageSize: 6 })
|
||||
const items = allItems()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user