docs: prepare configuration (#7877)
* update configuration * resolve todos + remove events guides * disable v2 docs in v1 navbar * remove v2 from v1 mobile sidebar * resolve build errors * fix build errors * fix lint errors * fix lint
This commit is contained in:
@@ -1,22 +1,17 @@
|
||||
import { NavbarItem, legacyNavbarItems, navbarItemsV1, navbarItemsV2 } from ".."
|
||||
import { NavbarItem, navbarItemsV1, navbarItemsV2 } from ".."
|
||||
|
||||
type Options = {
|
||||
basePath: string
|
||||
activePath: string
|
||||
version?: "v1" | "v2" | "legacy"
|
||||
version?: "v1" | "v2"
|
||||
}
|
||||
|
||||
export function getNavbarItems({
|
||||
basePath,
|
||||
activePath,
|
||||
version = "legacy",
|
||||
version = "v1",
|
||||
}: Options): NavbarItem[] {
|
||||
const navbarItems =
|
||||
version === "v2"
|
||||
? navbarItemsV2
|
||||
: version === "v1"
|
||||
? navbarItemsV1
|
||||
: legacyNavbarItems
|
||||
const navbarItems = version === "v2" ? navbarItemsV2 : navbarItemsV1
|
||||
return navbarItems.map((item) => {
|
||||
if (item.type === "divider") {
|
||||
return item
|
||||
|
||||
Reference in New Issue
Block a user