* 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
31 lines
692 B
TypeScript
31 lines
692 B
TypeScript
"use client"
|
|
import {
|
|
SidebarProvider as UiSidebarProvider,
|
|
usePageLoading,
|
|
useScrollController,
|
|
} from "docs-ui"
|
|
import { config } from "../config"
|
|
|
|
type SidebarProviderProps = {
|
|
children?: React.ReactNode
|
|
}
|
|
|
|
const SidebarProvider = ({ children }: SidebarProviderProps) => {
|
|
const { isLoading, setIsLoading } = usePageLoading()
|
|
const { scrollableElement } = useScrollController()
|
|
|
|
return (
|
|
<UiSidebarProvider
|
|
isLoading={isLoading}
|
|
setIsLoading={setIsLoading}
|
|
shouldHandleHashChange={true}
|
|
scrollableElement={scrollableElement}
|
|
initialItems={config.sidebar}
|
|
>
|
|
{children}
|
|
</UiSidebarProvider>
|
|
)
|
|
}
|
|
|
|
export default SidebarProvider
|