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:
Shahed Nasser
2024-07-03 19:27:13 +03:00
committed by GitHub
parent 012a624ee4
commit 6713d76db3
57 changed files with 2626 additions and 2906 deletions
@@ -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