diff --git a/docs/src/theme/Layout/index.js b/docs/src/theme/Layout/index.js index 2557d2c9f..a0286812a 100644 --- a/docs/src/theme/Layout/index.js +++ b/docs/src/theme/Layout/index.js @@ -14,6 +14,11 @@ import Footer from "@site/src/containers/Footer"; import LayoutProvider from "@theme/Layout/Provider"; import ErrorPageContent from "@theme/ErrorPageContent"; import styles from "./styles.module.scss"; +import NavBarExtension from "../NavbarExtension"; +import { useLocation } from "react-router-dom"; + +const allowedPaths = ["/docs/", "/developer/", "/api-reference/", "/guides/", "/guides", "/docs", "/developer", "/api-reference", "/guides/changelog"]; + export default function Layout(props) { const { children, @@ -24,6 +29,10 @@ export default function Layout(props) { description, } = props; useKeyboardNavigation(); + + const location = useLocation(); + + const isAllowedPath = allowedPaths.includes(location.pathname); return ( @@ -32,14 +41,20 @@ export default function Layout(props) { - + + + {isAllowedPath ? : ""} + + {/* {console.log("Is allowed path?", location.pathname)} */} +
}>