Skip to content

Commit 31f51df

Browse files
committed
fix: in react ui, switching between demos in sidebar can result in closing sidebar
Signed-off-by: Nick Mitchell <[email protected]>
1 parent 862ca81 commit 31f51df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pdl-live-react/src/page/Sidebar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function Sidebar() {
1919
const search = (s.length > 0 ? "?" + s : "") + hash
2020

2121
return (
22-
<PageSidebar isSidebarOpen={!!searchParams.get("sidebar")}>
22+
<PageSidebar isSidebarOpen={searchParams.has("sidebar")}>
2323
<PageSidebarBody>
2424
<Nav>
2525
<NavList>
@@ -35,8 +35,8 @@ export default function Sidebar() {
3535
</NavItem>
3636
</NavList>
3737

38-
<MyTraces hash={search + hash} activeItem={activeItem} />
39-
<Demos hash={hash} activeItem={activeItem} />
38+
<MyTraces hash={search} activeItem={activeItem} />
39+
<Demos hash={search} activeItem={activeItem} />
4040

4141
<NavItem itemId="about" isActive={activeItem === "/about"}>
4242
<Link to={"/about" + search}>About PDL</Link>

0 commit comments

Comments
 (0)