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,7 +8,6 @@ import {
|
||||
} from "docs-ui"
|
||||
import { useMemo } from "react"
|
||||
import { config } from "../config"
|
||||
import { basePathUrl } from "../utils/base-path-url"
|
||||
import { usePathname } from "next/navigation"
|
||||
import { generatedEditDates } from "../generated/edit-dates.mjs"
|
||||
|
||||
@@ -23,14 +22,8 @@ export const MainNavProvider = ({ children }: MainNavProviderProps) => {
|
||||
() =>
|
||||
getNavDropdownItems({
|
||||
basePath: config.baseUrl,
|
||||
activePath: basePathUrl(
|
||||
pathname.startsWith("/commerce-modules")
|
||||
? "/commerce-modules"
|
||||
: undefined
|
||||
),
|
||||
version: "v2",
|
||||
}),
|
||||
[pathname]
|
||||
[]
|
||||
)
|
||||
|
||||
const reportLink = useMemo(
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
AiAssistantIcon,
|
||||
AiAssistantProvider,
|
||||
SearchProvider as UiSearchProvider,
|
||||
searchFiltersV2,
|
||||
searchFilters,
|
||||
} from "docs-ui"
|
||||
import { config } from "../config"
|
||||
|
||||
@@ -39,7 +39,7 @@ const SearchProvider = ({ children }: SearchProviderProps) => {
|
||||
},
|
||||
],
|
||||
checkInternalPattern: new RegExp(`^${config.baseUrl}/v2/resources/.*`),
|
||||
filterOptions: searchFiltersV2,
|
||||
filterOptions: searchFilters,
|
||||
}}
|
||||
commands={[
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user