Filter out unlisted from trending, new, and daily trending on home page
This commit is contained in:
parent
27d765a4a1
commit
84aaeece9f
|
@ -32,7 +32,7 @@ export const useContracts = () => {
|
||||||
export const useTrendingContracts = (maxContracts: number) => {
|
export const useTrendingContracts = (maxContracts: number) => {
|
||||||
const { data } = useQuery(['trending-contracts', maxContracts], () =>
|
const { data } = useQuery(['trending-contracts', maxContracts], () =>
|
||||||
trendingIndex.search<CPMMBinaryContract>('', {
|
trendingIndex.search<CPMMBinaryContract>('', {
|
||||||
facetFilters: ['isResolved:false'],
|
facetFilters: ['isResolved:false', 'visibility:public'],
|
||||||
hitsPerPage: maxContracts,
|
hitsPerPage: maxContracts,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -43,7 +43,7 @@ export const useTrendingContracts = (maxContracts: number) => {
|
||||||
export const useNewContracts = (maxContracts: number) => {
|
export const useNewContracts = (maxContracts: number) => {
|
||||||
const { data } = useQuery(['newest-contracts', maxContracts], () =>
|
const { data } = useQuery(['newest-contracts', maxContracts], () =>
|
||||||
newIndex.search<CPMMBinaryContract>('', {
|
newIndex.search<CPMMBinaryContract>('', {
|
||||||
facetFilters: ['isResolved:false'],
|
facetFilters: ['isResolved:false', 'visibility:public'],
|
||||||
hitsPerPage: maxContracts,
|
hitsPerPage: maxContracts,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -57,7 +57,11 @@ export const useContractsByDailyScoreNotBetOn = (
|
||||||
) => {
|
) => {
|
||||||
const { data } = useQuery(['daily-score', userId, maxContracts], () =>
|
const { data } = useQuery(['daily-score', userId, maxContracts], () =>
|
||||||
dailyScoreIndex.search<CPMMBinaryContract>('', {
|
dailyScoreIndex.search<CPMMBinaryContract>('', {
|
||||||
facetFilters: ['isResolved:false', `uniqueBettors:-${userId}`],
|
facetFilters: [
|
||||||
|
'isResolved:false',
|
||||||
|
'visibility:public',
|
||||||
|
`uniqueBettors:-${userId}`,
|
||||||
|
],
|
||||||
hitsPerPage: maxContracts,
|
hitsPerPage: maxContracts,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user