From 7f6e4abb7f2d555c57534104c3177dcc58f57280 Mon Sep 17 00:00:00 2001 From: Arista Indrajaya Date: Wed, 6 Mar 2024 08:31:14 +0700 Subject: [PATCH] docs: Fix navbar issues. Keep stay when clicked other menu items from the sidebar. --- docs/src/theme/Layout/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/src/theme/Layout/index.js b/docs/src/theme/Layout/index.js index a0286812a..753af50af 100644 --- a/docs/src/theme/Layout/index.js +++ b/docs/src/theme/Layout/index.js @@ -32,7 +32,8 @@ export default function Layout(props) { const location = useLocation(); - const isAllowedPath = allowedPaths.includes(location.pathname); + const isAllowedPath = allowedPaths.some(path => location.pathname.startsWith(path)); + return (