docs: update nav items (#9709)
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
|||||||
} from "@medusajs/icons"
|
} from "@medusajs/icons"
|
||||||
import React, { useMemo, useRef, useState } from "react"
|
import React, { useMemo, useRef, useState } from "react"
|
||||||
import {
|
import {
|
||||||
|
BookIcon,
|
||||||
Button,
|
Button,
|
||||||
getOsShortcut,
|
getOsShortcut,
|
||||||
Menu,
|
Menu,
|
||||||
@@ -35,7 +36,13 @@ export const MainNavDesktopMenu = () => {
|
|||||||
type: "link",
|
type: "link",
|
||||||
icon: <HouseIcon />,
|
icon: <HouseIcon />,
|
||||||
title: "Homepage",
|
title: "Homepage",
|
||||||
link: "https://docs.medusajs.com/v2",
|
link: "https://medusajs.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
icon: <BookIcon />,
|
||||||
|
title: "Medusa v1",
|
||||||
|
link: "https://docs.medusajs.com",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import {
|
|||||||
SearchModalOpener,
|
SearchModalOpener,
|
||||||
useMainNav,
|
useMainNav,
|
||||||
useSidebar,
|
useSidebar,
|
||||||
|
useSiteConfig,
|
||||||
} from "../.."
|
} from "../.."
|
||||||
import { MainNavEditDate } from "./EditDate"
|
import { MainNavEditDate } from "./EditDate"
|
||||||
import { MainNavItems } from "./Items"
|
import { MainNavItems } from "./Items"
|
||||||
@@ -16,6 +17,7 @@ import { MedusaIcon } from "../Icons/MedusaLogo"
|
|||||||
import { MainNavDesktopMenu } from "./DesktopMenu"
|
import { MainNavDesktopMenu } from "./DesktopMenu"
|
||||||
import { SidebarLeftIcon } from "../Icons/SidebarLeft"
|
import { SidebarLeftIcon } from "../Icons/SidebarLeft"
|
||||||
import { MainNavMobileMenu } from "./MobileMenu"
|
import { MainNavMobileMenu } from "./MobileMenu"
|
||||||
|
import Link from "next/link"
|
||||||
|
|
||||||
type MainNavProps = {
|
type MainNavProps = {
|
||||||
className?: string
|
className?: string
|
||||||
@@ -25,6 +27,7 @@ type MainNavProps = {
|
|||||||
export const MainNav = ({ className, itemsClassName }: MainNavProps) => {
|
export const MainNav = ({ className, itemsClassName }: MainNavProps) => {
|
||||||
const { reportIssueLink, editDate } = useMainNav()
|
const { reportIssueLink, editDate } = useMainNav()
|
||||||
const { setMobileSidebarOpen, isSidebarShown } = useSidebar()
|
const { setMobileSidebarOpen, isSidebarShown } = useSidebar()
|
||||||
|
const { config } = useSiteConfig()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -46,10 +49,12 @@ export const MainNav = ({ className, itemsClassName }: MainNavProps) => {
|
|||||||
<SidebarLeftIcon />
|
<SidebarLeftIcon />
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<BorderedIcon
|
<Link href={`${config.baseUrl}/v2`}>
|
||||||
IconComponent={MedusaIcon}
|
<BorderedIcon
|
||||||
iconWrapperClassName="my-[14px]"
|
IconComponent={MedusaIcon}
|
||||||
/>
|
iconWrapperClassName="my-[14px]"
|
||||||
|
/>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<MainNavItems className={itemsClassName} />
|
<MainNavItems className={itemsClassName} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -50,11 +50,6 @@ export const navDropdownItems: NavigationItem[] = [
|
|||||||
{
|
{
|
||||||
type: "divider",
|
type: "divider",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: "link",
|
|
||||||
title: "UI Library",
|
|
||||||
link: "/ui",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
title: "Admin Components",
|
title: "Admin Components",
|
||||||
@@ -65,6 +60,11 @@ export const navDropdownItems: NavigationItem[] = [
|
|||||||
title: "Storefront Development",
|
title: "Storefront Development",
|
||||||
link: "/v2/resources/storefront-development",
|
link: "/v2/resources/storefront-development",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "UI Library",
|
||||||
|
link: "/ui",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -96,6 +96,65 @@ export const navDropdownItems: NavigationItem[] = [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "dropdown",
|
||||||
|
title: "Framework",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "API Routes",
|
||||||
|
link: "/v2/learn/basics/api-routes",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Modules",
|
||||||
|
link: "/v2/learn/basics/modules",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Subscribers",
|
||||||
|
link: "/v2/learn/basics/events-and-subscribers",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Scheduled Jobs",
|
||||||
|
link: "/v2/learn/basics/scheduled-jobs",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Loaders",
|
||||||
|
link: "/v2/learn/basics/loaders",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Admin Customizations",
|
||||||
|
link: "/v2/learn/basics/admin-customizations",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "divider",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Links",
|
||||||
|
link: "/v2/learn/advanced-development/module-links",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Query",
|
||||||
|
link: "/v2/learn/advanced-development/module-links/query",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Data Models",
|
||||||
|
link: "/v2/learn/advanced-development/data-models",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Workflows",
|
||||||
|
link: "/v2/learn/basics/workflows",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: "dropdown",
|
type: "dropdown",
|
||||||
title: "Reference",
|
title: "Reference",
|
||||||
@@ -123,6 +182,21 @@ export const navDropdownItems: NavigationItem[] = [
|
|||||||
title: "Data Model API",
|
title: "Data Model API",
|
||||||
link: "/v2/resources/references/data-model",
|
link: "/v2/resources/references/data-model",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Service Factory",
|
||||||
|
link: "/v2/resources/service-factory-reference",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Events Reference",
|
||||||
|
link: "/v2/resources/events-reference",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Admin Widget Injection Zones",
|
||||||
|
link: "/v2/resources/admin-widget-injection-zones",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user