Files
medusa-store/www/apps/book/config/sidebar.tsx
Shahed Nasser 728c5ee53c docs: preparations for preview (#7267)
* configured base paths + added development banner

* fix typelist site url

* added navbar and sidebar badges

* configure algolia filters

* remove AI assistant

* remove unused imports

* change navbar text and badge

* lint fixes

* fix build error

* add to api reference rewrites

* fix build error

* fix build errors in user-guide

* fix feedback component

* add parent title to pagination

* added breadcrumbs component

* remove user-guide links

* resolve todos

* fix details about authentication

* change documentation title

* lint content
2024-05-13 11:32:52 +03:00

25 lines
631 B
TypeScript

import { Badge, mobileSidebarItemsV2 } from "docs-ui"
import type { SidebarConfig, SidebarItemType } from "@/types"
import { sidebar } from "../sidebar.mjs"
const soonBadge = <Badge variant="blue">Soon</Badge>
const normalizeSidebarItems = (items: SidebarItemType[]) =>
items.map((item) => {
if (item.isSoon) {
item.additionalElms = soonBadge
}
if (item.children) {
item.children = normalizeSidebarItems(item.children as SidebarItemType[])
}
return item
})
export const sidebarConfig: SidebarConfig = {
top: normalizeSidebarItems(sidebar),
bottom: [],
mobile: mobileSidebarItemsV2,
}