Files
medusa-store/www/apps/resources/components/Navbar/index.tsx
Shahed Nasser 6713d76db3 docs: prepare configuration (#7877)
* update configuration

* resolve todos + remove events guides

* disable v2 docs in v1 navbar

* remove v2 from v1 mobile sidebar

* resolve build errors

* fix build errors

* fix lint errors

* fix lint
2024-07-03 19:27:13 +03:00

39 lines
868 B
TypeScript

"use client"
import { Navbar as UiNavbar, getNavbarItems } from "docs-ui"
import { useSidebar } from "docs-ui"
import { basePathUrl } from "../../utils/base-path-url"
import { useMemo } from "react"
import { config } from "../../config"
const Navbar = () => {
const { setMobileSidebarOpen, mobileSidebarOpen } = useSidebar()
const navbarItems = useMemo(
() =>
getNavbarItems({
basePath: config.baseUrl,
activePath: basePathUrl(""),
version: "v2",
}),
[]
)
return (
<UiNavbar
logo={{
light: basePathUrl("/images/logo-icon.png"),
dark: basePathUrl("/images/logo-icon-dark.png"),
}}
items={navbarItems}
mobileMenuButton={{
setMobileSidebarOpen,
mobileSidebarOpen,
}}
isLoading={false}
showSearchOpener
/>
)
}
export default Navbar