Always focus search bar on search page
This commit is contained in:
parent
9340d827d9
commit
3e9f046a29
|
@ -4,7 +4,6 @@ import { ContractSearch } from 'web/components/contract-search'
|
|||
import { useTracking } from 'web/hooks/use-tracking'
|
||||
import { useUser } from 'web/hooks/use-user'
|
||||
import { usePrefetch } from 'web/hooks/use-prefetch'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
export default function Search() {
|
||||
const user = useUser()
|
||||
|
@ -12,10 +11,6 @@ export default function Search() {
|
|||
|
||||
useTracking('view search')
|
||||
|
||||
const { query } = useRouter()
|
||||
const { q, s, p } = query
|
||||
const autoFocus = !(q || !s || !p)
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<Col className="mx-auto w-full p-2">
|
||||
|
@ -23,7 +18,7 @@ export default function Search() {
|
|||
user={user}
|
||||
persistPrefix="search"
|
||||
useQueryUrlParam={true}
|
||||
autoFocus={autoFocus}
|
||||
autoFocus
|
||||
/>
|
||||
</Col>
|
||||
</Page>
|
||||
|
|
Loading…
Reference in New Issue
Block a user