docs: redesigned navigation (#9525)
Redesign navigation bar to reflect new design and allow for dropdowns Closes DX-943
This commit is contained in:
1 parent
7c5415ba3a
commit
49a91fd40e
63 files changed
+934
-978
No files matched your search
@@ -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(
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import {
|
||||
usePageLoading,
|
||||
SearchProvider as UiSearchProvider,
|
||||
searchFiltersV2,
|
||||
searchFilters,
|
||||
AiAssistantIcon,
|
||||
AiAssistantProvider,
|
||||
} from "docs-ui"
|
||||
@@ -51,7 +51,7 @@ const SearchProvider = ({ children }: SearchProviderProps) => {
|
||||
checkInternalPattern: new RegExp(
|
||||
`^${config.baseUrl}${basePathUrl(`/(admin|store)`)}`
|
||||
),
|
||||
filterOptions: searchFiltersV2,
|
||||
filterOptions: searchFilters,
|
||||
}}
|
||||
commands={[
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user