Ignore filter on contract status when searching
This commit is contained in:
parent
d6cf4332da
commit
003301762c
|
@ -116,7 +116,9 @@ export function ContractSearch(props: {
|
|||
track('select search category', { category: pill ?? 'all' })
|
||||
}
|
||||
|
||||
let facetFilters = [
|
||||
let facetFilters = query
|
||||
? []
|
||||
: [
|
||||
filter === 'open' ? 'isResolved:false' : '',
|
||||
filter === 'closed' ? 'isResolved:false' : '',
|
||||
filter === 'resolved' ? 'isResolved:true' : '',
|
||||
|
@ -151,7 +153,9 @@ export function ContractSearch(props: {
|
|||
// Hack to make Algolia work.
|
||||
facetFilters = ['', ...facetFilters]
|
||||
|
||||
const numericFilters = [
|
||||
const numericFilters = query
|
||||
? []
|
||||
: [
|
||||
filter === 'open' ? `closeTime > ${Date.now()}` : '',
|
||||
filter === 'closed' ? `closeTime <= ${Date.now()}` : '',
|
||||
].filter((f) => f)
|
||||
|
@ -253,6 +257,7 @@ export function ContractSearch(props: {
|
|||
placeholder={showPlaceHolder ? `Search ${filter} markets` : ''}
|
||||
className="input input-bordered w-full"
|
||||
/>
|
||||
{!query && (
|
||||
<select
|
||||
className="select select-bordered"
|
||||
value={filter}
|
||||
|
@ -263,6 +268,7 @@ export function ContractSearch(props: {
|
|||
<option value="resolved">Resolved</option>
|
||||
<option value="all">All</option>
|
||||
</select>
|
||||
)}
|
||||
{!hideOrderSelector && (
|
||||
<select
|
||||
className="select select-bordered"
|
||||
|
|
Loading…
Reference in New Issue
Block a user