Revert "expand search bar when typing on mobile"

This reverts commit 43b1096313.
This commit is contained in:
mantikoros 2022-07-09 22:04:50 -04:00
parent 480b3e7c54
commit d063e209dd

View File

@ -22,7 +22,6 @@ import { Spacer } from './layout/spacer'
import { ENV, IS_PRIVATE_MANIFOLD } from 'common/envs/constants' import { ENV, IS_PRIVATE_MANIFOLD } from 'common/envs/constants'
import { trackCallback } from 'web/lib/service/analytics' import { trackCallback } from 'web/lib/service/analytics'
import ContractSearchFirestore from 'web/pages/contract-search-firestore' import ContractSearchFirestore from 'web/pages/contract-search-firestore'
import { useWindowSize } from 'web/hooks/use-window-size'
const searchClient = algoliasearch( const searchClient = algoliasearch(
'GJQPAYENIF', 'GJQPAYENIF',
@ -105,10 +104,6 @@ export function ContractSearch(props: {
const indexName = `${indexPrefix}contracts-${sort}` const indexName = `${indexPrefix}contracts-${sort}`
const [isSearching, setIsSearching] = useState(false)
const { width } = useWindowSize()
const showOptions = !isSearching || (width ?? 0) >= 500
if (IS_PRIVATE_MANIFOLD || process.env.NEXT_PUBLIC_FIREBASE_EMULATE) { if (IS_PRIVATE_MANIFOLD || process.env.NEXT_PUBLIC_FIREBASE_EMULATE) {
return ( return (
<ContractSearchFirestore <ContractSearchFirestore
@ -127,14 +122,9 @@ export function ContractSearch(props: {
classNames={{ classNames={{
form: 'before:top-6', form: 'before:top-6',
input: '!pl-10 !input !input-bordered shadow-none w-[100px]', input: '!pl-10 !input !input-bordered shadow-none w-[100px]',
resetIcon: 'mt-2 sm:flex', resetIcon: 'mt-2 hidden sm:flex',
}} }}
onFocus={() => setIsSearching(true)}
onBlur={() => setIsSearching(false)}
/> />
{showOptions && (
<>
<select <select
className="!select !select-bordered" className="!select !select-bordered"
value={filter} value={filter}
@ -146,7 +136,6 @@ export function ContractSearch(props: {
<option value="resolved">Resolved</option> <option value="resolved">Resolved</option>
<option value="all">All</option> <option value="all">All</option>
</select> </select>
{!hideOrderSelector && ( {!hideOrderSelector && (
<SortBy <SortBy
items={sortIndexes} items={sortIndexes}
@ -156,9 +145,6 @@ export function ContractSearch(props: {
onBlur={trackCallback('select search sort')} onBlur={trackCallback('select search sort')}
/> />
)} )}
</>
)}
<Configure <Configure
facetFilters={filters} facetFilters={filters}
numericFilters={numericFilters} numericFilters={numericFilters}