Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const data = useStaticQuery(
graphql`
{
site {
siteMetadata {
title
siteName
subtitle
}
}
}
`
)
const { openSidebar, closeSidebar, sidebarOpen } = useResponsiveSidebar()
const buttonRef = useRef(null)
const [menuOpen, setMenuOpen] = useState(false)
function openMenu() {
setMenuOpen(true)
}
function closeMenu() {
setMenuOpen(false)
}
function handleWrapperClick(event) {
if (sidebarOpen && !sidebarRef.current.contains(event.target)) {
closeSidebar()
}
title
siteName
subtitle
}
}
}
`
);
const {
sidebarRef,
openSidebar,
sidebarOpen,
handleWrapperClick,
handleSidebarNavLinkClick
} = useResponsiveSidebar();
const buttonRef = useRef(null);
const [menuOpen, setMenuOpen] = useState(false);
const selectedLanguageState = useLocalStorage('docs-lang');
function openMenu() {
setMenuOpen(true);
}
function closeMenu() {
setMenuOpen(false);
}
const {pathname} = props.location;
const {siteName, title, subtitle} = data.site.siteMetadata;
const {