Added useSearch hook

This commit is contained in:
Luis Alvarez
2020-10-13 03:49:24 -05:00
parent 1629f718b0
commit beed2d23e0
13 changed files with 3195 additions and 31 deletions

View File

@@ -1,4 +1,3 @@
import cn from 'classnames'
import { FC } from 'react'
import s from './Navbar.module.css'
import { Logo, Container } from '@components/ui'

View File

@@ -1,14 +1,19 @@
import { FC, useEffect } from 'react'
import cn from 'classnames'
import { FC } from 'react'
import s from './Searchbar.module.css'
import { useRouter } from 'next/router'
interface Props {
className?: string
children?: any
}
const Searchbar: FC<Props> = ({ className }) => {
const router = useRouter()
useEffect(() => {
router.prefetch('/search')
}, [])
return (
<div
className={cn(