docs: refactored versioning in api reference + modified v2 content (#7274)

This commit is contained in:
Shahed Nasser
2024-05-09 17:23:49 +03:00
committed by GitHub
parent 6da2964998
commit 5d0ffe8ff4
16 changed files with 1107 additions and 92 deletions

View File

@@ -11,11 +11,13 @@ import { useMemo } from "react"
import { config } from "../../config"
import { usePathname } from "next/navigation"
import VersionSwitcher from "../VersionSwitcher"
import { useVersion } from "../../providers/version"
const Navbar = () => {
const { setMobileSidebarOpen, mobileSidebarOpen } = useSidebar()
const pathname = usePathname()
const { isLoading } = usePageLoading()
const { isVersioningEnabled } = useVersion()
const navbarItems = useMemo(
() =>
@@ -38,9 +40,7 @@ const Navbar = () => {
mobileSidebarOpen,
}}
additionalActionsBefore={
<>
{process.env.NEXT_PUBLIC_VERSIONING === "true" && <VersionSwitcher />}
</>
<>{isVersioningEnabled && <VersionSwitcher />}</>
}
additionalActionsAfter={<FeedbackModal />}
isLoading={isLoading}