mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 21:03:47 +02:00
chore(v2): upgrade devDependencies (#2538)
* chore(v2): upgrade devDependencies * chore(v2): upgrade devDependencies * chore: prettier
This commit is contained in:
parent
ea8c916528
commit
b07507c9cc
148 changed files with 2385 additions and 1975 deletions
|
@ -9,12 +9,12 @@ import {useState, useCallback, useEffect} from 'react';
|
|||
import {useLocation} from '@docusaurus/router';
|
||||
import useLocationHash from '@theme/hooks/useLocationHash';
|
||||
|
||||
const useHideableNavbar = hideOnScroll => {
|
||||
const useHideableNavbar = (hideOnScroll) => {
|
||||
const [isNavbarVisible, setIsNavbarVisible] = useState(true);
|
||||
const [isFocusedAnchor, setIsFocusedAnchor] = useState(false);
|
||||
const [lastScrollTop, setLastScrollTop] = useState(0);
|
||||
const [navbarHeight, setNavbarHeight] = useState(0);
|
||||
const navbarRef = useCallback(node => {
|
||||
const navbarRef = useCallback((node) => {
|
||||
if (node !== null) {
|
||||
setNavbarHeight(node.getBoundingClientRect().height);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue