diff --git a/components/common/Navbar/Navbar.tsx b/components/common/Navbar/Navbar.tsx index d2d2b2d79..b2a372f66 100644 --- a/components/common/Navbar/Navbar.tsx +++ b/components/common/Navbar/Navbar.tsx @@ -1,66 +1,47 @@ -import { FC, useState, useEffect } from 'react' +import { FC } from 'react' import Link from 'next/link' -import s from './Navbar.module.css' import { Logo, Container } from '@components/ui' import { Searchbar, UserNav } from '@components/common' -import cn from 'classnames' -import throttle from 'lodash.throttle' +import NavbarRoot from './NavbarRoot' +import s from './Navbar.module.css' -const Navbar: FC = () => { - const [hasScrolled, setHasScrolled] = useState(false) - - useEffect(() => { - const handleScroll = throttle(() => { - const offset = 0 - const { scrollTop } = document.documentElement - const scrolled = scrollTop > offset - setHasScrolled(scrolled) - }, 200) - - document.addEventListener('scroll', handleScroll) - return () => { - document.removeEventListener('scroll', handleScroll) - } - }, []) - - return ( -