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 { trackCallback } from 'web/lib/service/analytics'
import ContractSearchFirestore from 'web/pages/contract-search-firestore'
import { useWindowSize } from 'web/hooks/use-window-size'
const searchClient = algoliasearch(
'GJQPAYENIF',
@ -105,10 +104,6 @@ export function ContractSearch(props: {
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) {
return (
<ContractSearchFirestore
@ -127,14 +122,9 @@ export function ContractSearch(props: {
classNames={{
form: 'before:top-6',
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
className="!select !select-bordered"
value={filter}
@ -146,7 +136,6 @@ export function ContractSearch(props: {
<option value="resolved">Resolved</option>
<option value="all">All</option>
</select>
{!hideOrderSelector && (
<SortBy
items={sortIndexes}
@ -156,9 +145,6 @@ export function ContractSearch(props: {
onBlur={trackCallback('select search sort')}
/>
)}
</>
)}
<Configure
facetFilters={filters}
numericFilters={numericFilters}