mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Avoid unnecesary rerenders
This commit is contained in:
@@ -5,12 +5,8 @@ import { Logo, Container } from '@components/ui'
|
||||
import { Searchbar, UserNav } from '@components/common'
|
||||
import cn from 'classnames'
|
||||
import throttle from 'lodash.throttle'
|
||||
interface Props {
|
||||
className?: string
|
||||
}
|
||||
|
||||
const Navbar: FC<Props> = ({ className }) => {
|
||||
const rootClassName = className
|
||||
const Navbar: FC = () => {
|
||||
const [hasScrolled, setHasScrolled] = useState(false)
|
||||
|
||||
const handleScroll = () => {
|
||||
|
Reference in New Issue
Block a user