From 2ab3885b51664ab79587d8eb4d1aefb01dd44404 Mon Sep 17 00:00:00 2001 From: abias Date: Tue, 20 Jun 2023 19:19:40 -0400 Subject: [PATCH] Fix mobile navbar bug --- src/shared/components/app/navbar.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/shared/components/app/navbar.tsx b/src/shared/components/app/navbar.tsx index 0163f603..5fa7580c 100644 --- a/src/shared/components/app/navbar.tsx +++ b/src/shared/components/app/navbar.tsx @@ -35,7 +35,11 @@ interface NavbarState { } function handleCollapseClick(i: Navbar) { - if (i.collapseButtonRef.current?.ariaExpanded === "true") { + if ( + i.collapseButtonRef.current?.attributes && + i.collapseButtonRef.current?.attributes.getNamedItem("aria-expanded") + ?.value === "true" + ) { i.collapseButtonRef.current?.click(); } } @@ -76,12 +80,8 @@ export class Navbar extends Component { document.removeEventListener("mouseup", this.handleOutsideMenuClick); } + // TODO class active corresponding to current pages render() { - return this.navbar(); - } - - // TODO class active corresponding to current page - navbar() { const siteView = this.props.siteRes?.site_view; const person = UserService.Instance.myUserInfo?.local_user_view.person; return (