2022-05-20 02:13:54 +00:00
|
|
|
/* eslint-disable react-hooks/exhaustive-deps */
|
2022-08-13 23:34:03 +00:00
|
|
|
import algoliasearch, { SearchIndex } from 'algoliasearch/lite'
|
|
|
|
import { SearchOptions } from '@algolia/client-search'
|
2022-06-05 19:06:08 +00:00
|
|
|
|
2022-07-01 22:37:30 +00:00
|
|
|
import { Contract } from 'common/contract'
|
2022-08-09 22:28:52 +00:00
|
|
|
import { User } from 'common/user'
|
2022-08-15 05:09:25 +00:00
|
|
|
import { Sort, useQuery, useSort } from '../hooks/use-sort-and-query-params'
|
2022-07-26 01:27:43 +00:00
|
|
|
import {
|
|
|
|
ContractHighlightOptions,
|
|
|
|
ContractsGrid,
|
2022-08-06 00:46:32 +00:00
|
|
|
} from './contract/contracts-grid'
|
2022-08-13 23:34:03 +00:00
|
|
|
import { ShowTime } from './contract/contract-details'
|
2022-05-09 17:38:33 +00:00
|
|
|
import { Row } from './layout/row'
|
2022-08-13 20:15:11 +00:00
|
|
|
import { useEffect, useRef, useMemo, useState } from 'react'
|
|
|
|
import { unstable_batchedUpdates } from 'react-dom'
|
2022-06-14 09:35:51 +00:00
|
|
|
import { ENV, IS_PRIVATE_MANIFOLD } from 'common/envs/constants'
|
2022-07-13 21:11:22 +00:00
|
|
|
import { useFollows } from 'web/hooks/use-follows'
|
2022-07-21 17:45:47 +00:00
|
|
|
import { track, trackCallback } from 'web/lib/service/analytics'
|
2022-06-22 23:45:48 +00:00
|
|
|
import ContractSearchFirestore from 'web/pages/contract-search-firestore'
|
2022-07-13 21:11:22 +00:00
|
|
|
import { useMemberGroups } from 'web/hooks/use-group'
|
2022-08-13 23:34:03 +00:00
|
|
|
import { NEW_USER_GROUP_SLUGS } from 'common/group'
|
2022-07-15 20:06:33 +00:00
|
|
|
import { PillButton } from './buttons/pill-button'
|
2022-08-15 05:09:25 +00:00
|
|
|
import { debounce, sortBy } from 'lodash'
|
2022-07-20 05:23:00 +00:00
|
|
|
import { DEFAULT_CATEGORY_GROUPS } from 'common/categories'
|
2022-07-30 00:08:51 +00:00
|
|
|
import { Col } from './layout/col'
|
2022-08-15 05:09:25 +00:00
|
|
|
import { safeLocalStorage } from 'web/lib/util/local'
|
2022-08-11 21:32:02 +00:00
|
|
|
import clsx from 'clsx'
|
2022-05-09 17:38:33 +00:00
|
|
|
|
2022-08-15 05:09:25 +00:00
|
|
|
// TODO: this obviously doesn't work with SSR, common sense would suggest
|
|
|
|
// that we should save things like this in cookies so the server has them
|
|
|
|
|
|
|
|
const MARKETS_SORT = 'markets_sort'
|
|
|
|
|
|
|
|
function setSavedSort(s: Sort) {
|
|
|
|
safeLocalStorage()?.setItem(MARKETS_SORT, s)
|
|
|
|
}
|
|
|
|
|
|
|
|
function getSavedSort() {
|
|
|
|
return safeLocalStorage()?.getItem(MARKETS_SORT) as Sort | null | undefined
|
|
|
|
}
|
|
|
|
|
2022-05-09 17:38:33 +00:00
|
|
|
const searchClient = algoliasearch(
|
|
|
|
'GJQPAYENIF',
|
|
|
|
'75c28fc084a80e1129d427d470cf41a3'
|
|
|
|
)
|
|
|
|
|
|
|
|
const indexPrefix = ENV === 'DEV' ? 'dev-' : ''
|
2022-07-30 01:13:53 +00:00
|
|
|
const searchIndexName = ENV === 'DEV' ? 'dev-contracts' : 'contractsIndex'
|
2022-05-09 17:38:33 +00:00
|
|
|
|
2022-07-30 00:08:51 +00:00
|
|
|
const sortOptions = [
|
|
|
|
{ label: 'Newest', value: 'newest' },
|
2022-08-01 15:03:46 +00:00
|
|
|
{ label: 'Trending', value: 'score' },
|
2022-07-30 00:08:51 +00:00
|
|
|
{ label: 'Most traded', value: 'most-traded' },
|
|
|
|
{ label: '24h volume', value: '24-hour-vol' },
|
|
|
|
{ label: 'Last updated', value: 'last-updated' },
|
|
|
|
{ label: 'Subsidy', value: 'liquidity' },
|
|
|
|
{ label: 'Close date', value: 'close-date' },
|
|
|
|
{ label: 'Resolve date', value: 'resolve-date' },
|
2022-05-09 17:38:33 +00:00
|
|
|
]
|
|
|
|
|
2022-07-13 21:11:22 +00:00
|
|
|
type filter = 'personal' | 'open' | 'closed' | 'resolved' | 'all'
|
2022-05-09 17:38:33 +00:00
|
|
|
|
2022-08-13 23:34:03 +00:00
|
|
|
type SearchParameters = {
|
|
|
|
index: SearchIndex
|
|
|
|
query: string
|
|
|
|
numericFilters: SearchOptions['numericFilters']
|
|
|
|
facetFilters: SearchOptions['facetFilters']
|
|
|
|
showTime?: ShowTime
|
|
|
|
}
|
|
|
|
|
|
|
|
type AdditionalFilter = {
|
|
|
|
creatorId?: string
|
|
|
|
tag?: string
|
|
|
|
excludeContractIds?: string[]
|
|
|
|
groupSlug?: string
|
|
|
|
}
|
|
|
|
|
2022-05-09 17:38:33 +00:00
|
|
|
export function ContractSearch(props: {
|
2022-08-11 21:32:02 +00:00
|
|
|
user?: User | null
|
2022-08-15 05:09:25 +00:00
|
|
|
defaultSort?: Sort
|
|
|
|
defaultFilter?: filter
|
2022-08-13 23:34:03 +00:00
|
|
|
additionalFilter?: AdditionalFilter
|
2022-07-26 01:27:43 +00:00
|
|
|
highlightOptions?: ContractHighlightOptions
|
2022-06-05 00:00:13 +00:00
|
|
|
onContractClick?: (contract: Contract) => void
|
2022-07-01 22:37:30 +00:00
|
|
|
hideOrderSelector?: boolean
|
|
|
|
overrideGridClassName?: string
|
2022-07-26 01:27:43 +00:00
|
|
|
cardHideOptions?: {
|
|
|
|
hideGroupLink?: boolean
|
|
|
|
hideQuickBet?: boolean
|
|
|
|
}
|
2022-08-11 21:32:02 +00:00
|
|
|
headerClassName?: string
|
2022-08-15 05:09:25 +00:00
|
|
|
useQuerySortLocalStorage?: boolean
|
|
|
|
useQuerySortUrlParams?: boolean
|
2022-05-09 17:38:33 +00:00
|
|
|
}) {
|
2022-06-05 00:14:14 +00:00
|
|
|
const {
|
2022-08-09 22:28:52 +00:00
|
|
|
user,
|
2022-08-15 05:09:25 +00:00
|
|
|
defaultSort,
|
|
|
|
defaultFilter,
|
2022-06-05 00:14:14 +00:00
|
|
|
additionalFilter,
|
|
|
|
onContractClick,
|
2022-07-01 22:37:30 +00:00
|
|
|
overrideGridClassName,
|
|
|
|
hideOrderSelector,
|
2022-07-26 01:27:43 +00:00
|
|
|
cardHideOptions,
|
|
|
|
highlightOptions,
|
2022-08-11 21:32:02 +00:00
|
|
|
headerClassName,
|
2022-08-15 05:09:25 +00:00
|
|
|
useQuerySortLocalStorage,
|
|
|
|
useQuerySortUrlParams,
|
2022-06-05 00:14:14 +00:00
|
|
|
} = props
|
2022-05-09 17:38:33 +00:00
|
|
|
|
2022-08-13 23:34:03 +00:00
|
|
|
const [numPages, setNumPages] = useState(1)
|
|
|
|
const [pages, setPages] = useState<Contract[][]>([])
|
|
|
|
const [showTime, setShowTime] = useState<ShowTime | undefined>()
|
|
|
|
|
|
|
|
const searchParameters = useRef<SearchParameters | undefined>()
|
|
|
|
const requestId = useRef(0)
|
|
|
|
|
|
|
|
const performQuery = async (freshQuery?: boolean) => {
|
|
|
|
if (searchParameters.current === undefined) {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
const params = searchParameters.current
|
|
|
|
const id = ++requestId.current
|
|
|
|
const requestedPage = freshQuery ? 0 : pages.length
|
|
|
|
if (freshQuery || requestedPage < numPages) {
|
|
|
|
const results = await params.index.search(params.query, {
|
|
|
|
facetFilters: params.facetFilters,
|
|
|
|
numericFilters: params.numericFilters,
|
|
|
|
page: requestedPage,
|
|
|
|
hitsPerPage: 20,
|
|
|
|
})
|
|
|
|
// if there's a more recent request, forget about this one
|
|
|
|
if (id === requestId.current) {
|
|
|
|
const newPage = results.hits as any as Contract[]
|
|
|
|
// this spooky looking function is the easiest way to get react to
|
|
|
|
// batch this and not do multiple renders. we can throw it out in react 18.
|
|
|
|
// see https://github.com/reactwg/react-18/discussions/21
|
|
|
|
unstable_batchedUpdates(() => {
|
|
|
|
setShowTime(params.showTime)
|
|
|
|
setNumPages(results.nbPages)
|
|
|
|
if (freshQuery) {
|
|
|
|
setPages([newPage])
|
2022-08-15 19:26:18 +00:00
|
|
|
window.scrollTo(0, 0)
|
2022-08-13 23:34:03 +00:00
|
|
|
} else {
|
|
|
|
setPages((pages) => [...pages, newPage])
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-15 05:09:25 +00:00
|
|
|
const onSearchParametersChanged = useRef(
|
|
|
|
debounce((params) => {
|
|
|
|
searchParameters.current = params
|
|
|
|
performQuery(true)
|
|
|
|
}, 100)
|
|
|
|
).current
|
|
|
|
|
2022-08-13 23:34:03 +00:00
|
|
|
const contracts = pages
|
|
|
|
.flat()
|
|
|
|
.filter((c) => !additionalFilter?.excludeContractIds?.includes(c.id))
|
|
|
|
|
|
|
|
if (IS_PRIVATE_MANIFOLD || process.env.NEXT_PUBLIC_FIREBASE_EMULATE) {
|
2022-08-15 05:09:25 +00:00
|
|
|
return <ContractSearchFirestore additionalFilter={additionalFilter} />
|
2022-08-13 23:34:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Col className="h-full">
|
|
|
|
<ContractSearchControls
|
|
|
|
className={headerClassName}
|
2022-08-15 05:09:25 +00:00
|
|
|
defaultSort={defaultSort}
|
|
|
|
defaultFilter={defaultFilter}
|
2022-08-13 23:34:03 +00:00
|
|
|
additionalFilter={additionalFilter}
|
|
|
|
hideOrderSelector={hideOrderSelector}
|
2022-08-15 05:09:25 +00:00
|
|
|
useQuerySortLocalStorage={useQuerySortLocalStorage}
|
|
|
|
useQuerySortUrlParams={useQuerySortUrlParams}
|
2022-08-13 23:34:03 +00:00
|
|
|
user={user}
|
2022-08-15 05:09:25 +00:00
|
|
|
onSearchParametersChanged={onSearchParametersChanged}
|
2022-08-13 23:34:03 +00:00
|
|
|
/>
|
|
|
|
<ContractsGrid
|
|
|
|
contracts={pages.length === 0 ? undefined : contracts}
|
|
|
|
loadMore={performQuery}
|
|
|
|
showTime={showTime}
|
|
|
|
onContractClick={onContractClick}
|
|
|
|
overrideGridClassName={overrideGridClassName}
|
|
|
|
highlightOptions={highlightOptions}
|
|
|
|
cardHideOptions={cardHideOptions}
|
|
|
|
/>
|
|
|
|
</Col>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
function ContractSearchControls(props: {
|
|
|
|
className?: string
|
2022-08-15 05:09:25 +00:00
|
|
|
defaultSort?: Sort
|
|
|
|
defaultFilter?: filter
|
2022-08-13 23:34:03 +00:00
|
|
|
additionalFilter?: AdditionalFilter
|
|
|
|
hideOrderSelector?: boolean
|
|
|
|
onSearchParametersChanged: (params: SearchParameters) => void
|
2022-08-15 05:09:25 +00:00
|
|
|
useQuerySortLocalStorage?: boolean
|
|
|
|
useQuerySortUrlParams?: boolean
|
2022-08-13 23:34:03 +00:00
|
|
|
user?: User | null
|
|
|
|
}) {
|
|
|
|
const {
|
|
|
|
className,
|
2022-08-15 05:09:25 +00:00
|
|
|
defaultSort,
|
|
|
|
defaultFilter,
|
2022-08-13 23:34:03 +00:00
|
|
|
additionalFilter,
|
|
|
|
hideOrderSelector,
|
|
|
|
onSearchParametersChanged,
|
2022-08-15 05:09:25 +00:00
|
|
|
useQuerySortLocalStorage,
|
|
|
|
useQuerySortUrlParams,
|
2022-08-13 23:34:03 +00:00
|
|
|
user,
|
|
|
|
} = props
|
|
|
|
|
2022-08-15 05:09:25 +00:00
|
|
|
const savedSort = useQuerySortLocalStorage ? getSavedSort() : null
|
|
|
|
const initialSort = savedSort ?? defaultSort ?? 'score'
|
|
|
|
const querySortOpts = { useUrl: !!useQuerySortUrlParams }
|
|
|
|
const [sort, setSort] = useSort(initialSort, querySortOpts)
|
|
|
|
const [query, setQuery] = useQuery('', querySortOpts)
|
|
|
|
const [filter, setFilter] = useState<filter>(defaultFilter ?? 'open')
|
|
|
|
const [pillFilter, setPillFilter] = useState<string | undefined>(undefined)
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
if (useQuerySortLocalStorage) {
|
|
|
|
setSavedSort(sort)
|
|
|
|
}
|
|
|
|
}, [sort])
|
2022-08-13 23:34:03 +00:00
|
|
|
|
|
|
|
const follows = useFollows(user?.id)
|
2022-07-19 23:22:55 +00:00
|
|
|
const memberGroups = (useMemberGroups(user?.id) ?? []).filter(
|
|
|
|
(group) => !NEW_USER_GROUP_SLUGS.includes(group.slug)
|
|
|
|
)
|
2022-07-20 05:23:00 +00:00
|
|
|
const memberGroupSlugs =
|
|
|
|
memberGroups.length > 0
|
|
|
|
? memberGroups.map((g) => g.slug)
|
|
|
|
: DEFAULT_CATEGORY_GROUPS.map((g) => g.slug)
|
|
|
|
|
|
|
|
const memberPillGroups = sortBy(
|
2022-07-19 23:22:55 +00:00
|
|
|
memberGroups.filter((group) => group.contractIds.length > 0),
|
|
|
|
(group) => group.contractIds.length
|
|
|
|
).reverse()
|
2022-07-20 05:23:00 +00:00
|
|
|
|
2022-08-13 23:34:03 +00:00
|
|
|
const pillGroups: { name: string; slug: string }[] =
|
|
|
|
memberPillGroups.length > 0 ? memberPillGroups : DEFAULT_CATEGORY_GROUPS
|
2022-05-09 17:38:33 +00:00
|
|
|
|
2022-07-30 01:13:53 +00:00
|
|
|
const additionalFilters = [
|
|
|
|
additionalFilter?.creatorId
|
|
|
|
? `creatorId:${additionalFilter.creatorId}`
|
|
|
|
: '',
|
|
|
|
additionalFilter?.tag ? `lowercaseTags:${additionalFilter.tag}` : '',
|
|
|
|
additionalFilter?.groupSlug
|
|
|
|
? `groupLinks.slug:${additionalFilter.groupSlug}`
|
|
|
|
: '',
|
|
|
|
]
|
2022-08-03 21:17:45 +00:00
|
|
|
const facetFilters = query
|
2022-07-30 01:13:53 +00:00
|
|
|
? additionalFilters
|
2022-07-30 00:37:53 +00:00
|
|
|
: [
|
2022-07-30 01:13:53 +00:00
|
|
|
...additionalFilters,
|
2022-07-30 00:37:53 +00:00
|
|
|
filter === 'open' ? 'isResolved:false' : '',
|
|
|
|
filter === 'closed' ? 'isResolved:false' : '',
|
|
|
|
filter === 'resolved' ? 'isResolved:true' : '',
|
|
|
|
pillFilter && pillFilter !== 'personal' && pillFilter !== 'your-bets'
|
|
|
|
? `groupLinks.slug:${pillFilter}`
|
|
|
|
: '',
|
|
|
|
pillFilter === 'personal'
|
|
|
|
? // Show contracts in groups that the user is a member of
|
|
|
|
memberGroupSlugs
|
|
|
|
.map((slug) => `groupLinks.slug:${slug}`)
|
|
|
|
// Show contracts created by users the user follows
|
|
|
|
.concat(follows?.map((followId) => `creatorId:${followId}`) ?? [])
|
|
|
|
// Show contracts bet on by users the user follows
|
|
|
|
.concat(
|
|
|
|
follows?.map((followId) => `uniqueBettorIds:${followId}`) ?? []
|
|
|
|
)
|
|
|
|
: '',
|
|
|
|
// Subtract contracts you bet on from For you.
|
|
|
|
pillFilter === 'personal' && user ? `uniqueBettorIds:-${user.id}` : '',
|
|
|
|
pillFilter === 'your-bets' && user
|
|
|
|
? // Show contracts bet on by the user
|
|
|
|
`uniqueBettorIds:${user.id}`
|
|
|
|
: '',
|
|
|
|
].filter((f) => f)
|
2022-07-30 00:08:51 +00:00
|
|
|
|
2022-07-30 00:37:53 +00:00
|
|
|
const numericFilters = query
|
|
|
|
? []
|
|
|
|
: [
|
|
|
|
filter === 'open' ? `closeTime > ${Date.now()}` : '',
|
|
|
|
filter === 'closed' ? `closeTime <= ${Date.now()}` : '',
|
|
|
|
].filter((f) => f)
|
2022-05-17 17:56:10 +00:00
|
|
|
|
2022-08-13 23:34:03 +00:00
|
|
|
const selectPill = (pill: string | undefined) => () => {
|
|
|
|
setPillFilter(pill)
|
|
|
|
track('select search category', { category: pill ?? 'all' })
|
2022-07-30 00:08:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const updateQuery = (newQuery: string) => {
|
|
|
|
setQuery(newQuery)
|
|
|
|
}
|
|
|
|
|
|
|
|
const selectFilter = (newFilter: filter) => {
|
|
|
|
if (newFilter === filter) return
|
|
|
|
setFilter(newFilter)
|
2022-08-10 16:50:21 +00:00
|
|
|
track('select search filter', { filter: newFilter })
|
2022-07-30 00:08:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const selectSort = (newSort: Sort) => {
|
|
|
|
if (newSort === sort) return
|
|
|
|
setSort(newSort)
|
2022-08-10 16:50:21 +00:00
|
|
|
track('select search sort', { sort: newSort })
|
2022-07-30 00:08:51 +00:00
|
|
|
}
|
2022-06-03 04:52:14 +00:00
|
|
|
|
2022-08-13 23:34:03 +00:00
|
|
|
const indexName = `${indexPrefix}contracts-${sort}`
|
|
|
|
const index = useMemo(() => searchClient.initIndex(indexName), [indexName])
|
|
|
|
const searchIndex = useMemo(
|
|
|
|
() => searchClient.initIndex(searchIndexName),
|
|
|
|
[searchIndexName]
|
|
|
|
)
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
onSearchParametersChanged({
|
|
|
|
index: query ? searchIndex : index,
|
|
|
|
query: query,
|
|
|
|
numericFilters: numericFilters,
|
|
|
|
facetFilters: facetFilters,
|
|
|
|
showTime:
|
|
|
|
sort === 'close-date' || sort === 'resolve-date' ? sort : undefined,
|
|
|
|
})
|
|
|
|
}, [query, index, searchIndex, filter, JSON.stringify(facetFilters)])
|
2022-06-14 09:35:51 +00:00
|
|
|
|
2022-05-09 17:38:33 +00:00
|
|
|
return (
|
2022-08-13 23:34:03 +00:00
|
|
|
<Col
|
|
|
|
className={clsx('bg-base-200 sticky top-0 z-20 gap-3 pb-3', className)}
|
|
|
|
>
|
|
|
|
<Row className="gap-1 sm:gap-2">
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
value={query}
|
|
|
|
onChange={(e) => updateQuery(e.target.value)}
|
|
|
|
onBlur={trackCallback('search', { query })}
|
|
|
|
placeholder={'Search'}
|
|
|
|
className="input input-bordered w-full"
|
|
|
|
/>
|
|
|
|
{!query && (
|
|
|
|
<select
|
|
|
|
className="select select-bordered"
|
|
|
|
value={filter}
|
|
|
|
onChange={(e) => selectFilter(e.target.value as filter)}
|
|
|
|
>
|
|
|
|
<option value="open">Open</option>
|
|
|
|
<option value="closed">Closed</option>
|
|
|
|
<option value="resolved">Resolved</option>
|
|
|
|
<option value="all">All</option>
|
|
|
|
</select>
|
2022-07-30 00:37:53 +00:00
|
|
|
)}
|
2022-08-13 23:34:03 +00:00
|
|
|
{!hideOrderSelector && !query && (
|
|
|
|
<select
|
|
|
|
className="select select-bordered"
|
|
|
|
value={sort}
|
|
|
|
onChange={(e) => selectSort(e.target.value as Sort)}
|
|
|
|
>
|
|
|
|
{sortOptions.map((option) => (
|
|
|
|
<option key={option.value} value={option.value}>
|
|
|
|
{option.label}
|
|
|
|
</option>
|
|
|
|
))}
|
|
|
|
</select>
|
|
|
|
)}
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
{!additionalFilter && !query && (
|
|
|
|
<Row className="scrollbar-hide items-start gap-2 overflow-x-auto">
|
|
|
|
<PillButton
|
|
|
|
key={'all'}
|
|
|
|
selected={pillFilter === undefined}
|
|
|
|
onSelect={selectPill(undefined)}
|
|
|
|
>
|
|
|
|
All
|
|
|
|
</PillButton>
|
|
|
|
<PillButton
|
|
|
|
key={'personal'}
|
|
|
|
selected={pillFilter === 'personal'}
|
|
|
|
onSelect={selectPill('personal')}
|
|
|
|
>
|
|
|
|
{user ? 'For you' : 'Featured'}
|
|
|
|
</PillButton>
|
|
|
|
|
|
|
|
{user && (
|
2022-08-11 21:32:02 +00:00
|
|
|
<PillButton
|
2022-08-13 23:34:03 +00:00
|
|
|
key={'your-bets'}
|
|
|
|
selected={pillFilter === 'your-bets'}
|
|
|
|
onSelect={selectPill('your-bets')}
|
2022-08-11 21:32:02 +00:00
|
|
|
>
|
2022-08-13 23:34:03 +00:00
|
|
|
Your bets
|
2022-07-22 19:50:29 +00:00
|
|
|
</PillButton>
|
2022-08-13 23:34:03 +00:00
|
|
|
)}
|
2022-07-20 20:30:07 +00:00
|
|
|
|
2022-08-13 23:34:03 +00:00
|
|
|
{pillGroups.map(({ name, slug }) => {
|
|
|
|
return (
|
2022-07-19 23:22:55 +00:00
|
|
|
<PillButton
|
2022-08-13 23:34:03 +00:00
|
|
|
key={slug}
|
|
|
|
selected={pillFilter === slug}
|
|
|
|
onSelect={selectPill(slug)}
|
2022-07-19 23:22:55 +00:00
|
|
|
>
|
2022-08-13 23:34:03 +00:00
|
|
|
{name}
|
2022-07-19 23:22:55 +00:00
|
|
|
</PillButton>
|
2022-08-13 23:34:03 +00:00
|
|
|
)
|
|
|
|
})}
|
|
|
|
</Row>
|
2022-07-13 21:11:22 +00:00
|
|
|
)}
|
2022-07-30 00:08:51 +00:00
|
|
|
</Col>
|
2022-05-09 17:38:33 +00:00
|
|
|
)
|
|
|
|
}
|