import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline'; import { AlgoliaSearch } from '@nrwl/nx-dev/feature-search'; import { ThemeSwitcher } from '@nrwl/nx-dev/ui-theme'; import cx from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; function Menu({ tabs }: { tabs: any[] }): JSX.Element { return (
); } export function DocumentationHeader({ isNavOpen, toggleNav, }: { isNavOpen: boolean; toggleNav: (value: boolean) => void; }): JSX.Element { const router = useRouter(); const isNxCloud: boolean = router.asPath.startsWith('/nx-cloud'); const isPackages: boolean = router.asPath.startsWith('/packages'); const isPlugins: boolean = router.asPath.startsWith('/plugins'); const isRecipes: boolean = router.asPath.startsWith('/recipes'); const isNx: boolean = !isNxCloud && !isPackages && !isPlugins && !isRecipes; const sections = [ { name: 'Home', href: '/', current: false }, { name: 'Nx', href: '/getting-started/intro', current: isNx }, { name: 'Nx Cloud', href: '/nx-cloud/intro/what-is-nx-cloud', current: isNxCloud, }, { name: 'Packages', href: '/packages', current: isPackages, }, { name: 'Plugins', href: '/community#plugin-directory', current: isPlugins, }, { name: 'Recipes', href: '/recipes', current: isRecipes, }, ]; const communityLinks = [ { name: 'Slack', label: 'Community channel', href: 'https://go.nrwl.io/join-slack?utm_source=nx.dev', icon: (props: any) => ( {/*Slack*/} ), }, { name: 'Twitter', label: 'Latest news', href: 'https://twitter.com/NXdevtools?utm_source=nx.dev', icon: (props: any) => ( {/*Twitter*/} ), }, { name: 'Youtube', label: 'Youtube channel', href: 'https://www.youtube.com/c/Nrwl_io?utm_source=nx.dev', icon: (props: any) => ( {/*YouTube*/} ), }, { name: 'Github', label: 'Nx is open source, check the code on Github', href: 'https://github.com/nrwl/nx?utm_source=nx.dev', icon: (props: any) => ( {/*Github*/} ), }, ]; return (
{/*MOBILE MENU*/}
{/*SEARCH*/}
{/*LOGO*/}
Nx Docs
{/*SEARCH*/}
{/*NAVIGATION*/}
{/* SPACER */}
); }