docs: generate + configure js sdk reference (#9714)

Manually generate the JS SDK reference + add it to the sidebar
This commit is contained in:
Shahed Nasser
2024-10-22 17:31:32 +00:00
committed by GitHub
parent af3c6b0d93
commit a1190b7208
476 changed files with 76450 additions and 189 deletions
@@ -28,6 +28,7 @@ export const SidebarItemCategory = ({
updatePersistedCategoryState,
getPersistedCategoryState,
persistState,
activePath,
} = useSidebar()
const itemShowLoading = useMemo(() => {
return !item.loaded || (item.showLoadingIfEmpty && !item.children?.length)
@@ -47,6 +48,7 @@ export const SidebarItemCategory = ({
useEffect(() => {
const isActive = isChildrenActive(item)
if (isActive && !open) {
setOpen(true)
}
@@ -1,6 +1,6 @@
"use client"
import React, { useMemo, useRef } from "react"
import React, { Suspense, useMemo, useRef } from "react"
import { useSidebar } from "@/providers"
import clsx from "clsx"
import { Loading } from "@/components"
@@ -142,12 +142,24 @@ export const Sidebar = ({
? `${item.path}-${index}`
: `${item.title}-${index}`
return (
<SidebarItem
item={item}
<Suspense
fallback={
<Loading
count={1}
className="!mb-0 !px-docs_0.5"
barClassName="h-[20px]"
/>
}
key={itemKey}
expandItems={expandItems}
hasNextItems={index !== sidebarItems.default.length - 1}
/>
>
<SidebarItem
item={item}
expandItems={expandItems}
hasNextItems={
index !== sidebarItems.default.length - 1
}
/>
</Suspense>
)
})}
</div>