diff --git a/src/components/HamburgerMenu/index.tsx b/src/components/HamburgerMenu/index.tsx index 3c7c0e1d1b..9a2a76d850 100644 --- a/src/components/HamburgerMenu/index.tsx +++ b/src/components/HamburgerMenu/index.tsx @@ -9,6 +9,7 @@ import { getFirstPage } from '../../utils/shared/sidebar' import { ReactComponent as LogoSVG } from '../../../static/img/logo-white.svg' import { ReactComponent as TwitterIcon } from '../SocialIcon/twitter.svg' import { ReactComponent as GithubIcon } from '../SocialIcon/github.svg' +import { useHeaderIsScrolled } from '../../utils/front/scroll' import styles from './styles.module.css' @@ -16,6 +17,7 @@ const docsPage = getFirstPage() const HamburgerMenu: React.FC = () => { const [isOpened, setOpened] = useState(false) + const collapsed = useHeaderIsScrolled() const toggleMobileMenu = useCallback(() => setOpened(!isOpened), [isOpened]) const openOnEnterKey = useCallback(e => { @@ -42,7 +44,7 @@ const HamburgerMenu: React.FC = () => { return (