25ee793208
* Factor out section header * Remove daily balance change * Remove dead code * Layout, add streak * Fix visibility observer to work on server * Tweak * Search perserved by url * Add pill query param * Add search page * Extract component for ProbChangeRow * Explore groups page * Add search row * Add trending groups section * Add unfollow option for group * Experimental home: accommodate old saved sections. * Tweaks to search layout * Rearrange layout * Daily movers page * Add streak grayed out indicator * Use firebase query instead of algolia search for groups * Replace trending group card with pills * Hide streak if you turned off that notification * Listen for group updates * Better UI for adding / removing groups * Toast feedback for join/leave group. Customize button moved to bottom. * Remove Home title * Refactor arrange home * Add new for you section * Add prefetch * Move home out of experimental! * Remove unused import * Show non-public markets from group
31 lines
809 B
TypeScript
31 lines
809 B
TypeScript
import { Page } from 'web/components/page'
|
|
import { Col } from 'web/components/layout/col'
|
|
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()
|
|
usePrefetch(user?.id)
|
|
|
|
useTracking('view search')
|
|
|
|
const { query } = useRouter()
|
|
const autoFocus = !(query['q'] || query['s'] || query['p'])
|
|
|
|
return (
|
|
<Page>
|
|
<Col className="mx-auto w-full p-2">
|
|
<ContractSearch
|
|
user={user}
|
|
persistPrefix="search"
|
|
useQueryUrlParam={true}
|
|
autoFocus={autoFocus}
|
|
/>
|
|
</Col>
|
|
</Page>
|
|
)
|
|
}
|