Skip to content

Commit

Permalink
Avoid unnecesary rerenders
Browse files Browse the repository at this point in the history
  • Loading branch information
okbel committed Nov 6, 2020
1 parent 2ad7c59 commit 817fee6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions components/common/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down

0 comments on commit 817fee6

Please sign in to comment.