docs: add user guide to navbar (#11611)
* docs: add user guide to navbar * fix titles
This commit is contained in:
@@ -6,7 +6,6 @@ import {
|
||||
BorderedIcon,
|
||||
Button,
|
||||
GITHUB_ISSUES_LINK,
|
||||
LinkButton,
|
||||
SearchModalOpener,
|
||||
useLayout,
|
||||
useMainNav,
|
||||
|
||||
@@ -33,7 +33,7 @@ export const navDropdownItems: NavigationItem[] = [
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Guides",
|
||||
title: "All Guides",
|
||||
link: "/resources",
|
||||
useAsFallback: true,
|
||||
},
|
||||
@@ -47,11 +47,6 @@ export const navDropdownItems: NavigationItem[] = [
|
||||
title: "Recipes",
|
||||
link: "/resources/recipes",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Plugin Guides",
|
||||
link: "/resources/plugins",
|
||||
},
|
||||
{
|
||||
type: "divider",
|
||||
},
|
||||
@@ -65,17 +60,17 @@ export const navDropdownItems: NavigationItem[] = [
|
||||
title: "Storefront Development",
|
||||
link: "/resources/storefront-development",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "UI Library",
|
||||
link: "/ui",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "dropdown",
|
||||
title: "Tools & SDKs",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "UI Library",
|
||||
link: "/ui",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Medusa CLI",
|
||||
@@ -211,6 +206,11 @@ export const navDropdownItems: NavigationItem[] = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "User Guide",
|
||||
path: "/user-guide",
|
||||
},
|
||||
]
|
||||
|
||||
export const searchFilters: OptionType[] = [
|
||||
@@ -224,15 +224,14 @@ export const searchFilters: OptionType[] = [
|
||||
},
|
||||
{
|
||||
value: "admin-v2",
|
||||
label: "Admin API (v2)",
|
||||
label: "Admin API",
|
||||
},
|
||||
{
|
||||
value: "store-v2",
|
||||
label: "Store API (v2)",
|
||||
label: "Store API",
|
||||
},
|
||||
{
|
||||
value: "ui",
|
||||
label: "Medusa UI",
|
||||
},
|
||||
// TODO add more filters
|
||||
]
|
||||
|
||||
@@ -24,12 +24,12 @@ export const LayoutProvider = ({
|
||||
const [showCollapsedNavbar, setShowCollapsedNavbar] = useState(false)
|
||||
|
||||
useResizeObserver(mainContentRef as React.RefObject<HTMLDivElement>, () => {
|
||||
if (disableResizeObserver || window.innerWidth < 992) {
|
||||
if (disableResizeObserver || window.innerWidth < 1100) {
|
||||
setShowCollapsedNavbar(false)
|
||||
return
|
||||
}
|
||||
if (mainContentRef.current) {
|
||||
setShowCollapsedNavbar(mainContentRef.current.clientWidth < 992)
|
||||
setShowCollapsedNavbar(mainContentRef.current.clientWidth < 1100)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user