docs: redesigned navigation (#9525)

Redesign navigation bar to reflect new design and allow for dropdowns

Closes DX-943
This commit is contained in:
Shahed Nasser
2024-10-11 07:10:00 +00:00
committed by GitHub
parent 7c5415ba3a
commit 49a91fd40e
63 changed files with 934 additions and 978 deletions
@@ -8,8 +8,6 @@ import {
} from "docs-ui"
import { useMemo } from "react"
import { config } from "../config"
import { usePathname } from "next/navigation"
import basePathUrl from "../utils/base-path-url"
type MainNavProviderProps = {
children?: React.ReactNode
@@ -17,15 +15,12 @@ type MainNavProviderProps = {
export const MainNavProvider = ({ children }: MainNavProviderProps) => {
const { isBrowser } = useIsBrowser()
const pathname = usePathname()
const navigationDropdownItems = useMemo(
() =>
getNavDropdownItems({
basePath: config.baseUrl,
activePath: basePathUrl(pathname),
version: "v2",
}),
[pathname]
[]
)
const reportLink = useMemo(