docs: enhanced sidebar context (#4165)
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import React, { useContext } from "react"
|
||||
import React from "react"
|
||||
import { useDocsSidebar } from "@docusaurus/theme-common/internal"
|
||||
import Layout from "@theme/Layout"
|
||||
import BackToTopButton from "@theme/BackToTopButton"
|
||||
import DocPageLayoutSidebar from "@theme/DocPage/Layout/Sidebar"
|
||||
import DocPageLayoutMain from "@theme/DocPage/Layout/Main"
|
||||
import type { Props } from "@theme/DocPage/Layout"
|
||||
import { SidebarContext } from "@site/src/context/sidebar"
|
||||
import clsx from "clsx"
|
||||
import { useSidebar } from "@site/src/providers/Sidebar"
|
||||
|
||||
export default function DocPageLayout({ children }: Props): JSX.Element {
|
||||
const sidebar = useDocsSidebar()
|
||||
const sidebarContext = useContext(SidebarContext)
|
||||
const sidebarContext = useSidebar()
|
||||
return (
|
||||
<Layout wrapperClassName={clsx("tw-flex tw-flex-[1_0_auto]")}>
|
||||
<BackToTopButton />
|
||||
|
||||
Reference in New Issue
Block a user