mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-29 15:51:14 +00:00
Fix mobile navbar bug
This commit is contained in:
parent
94bc9092ee
commit
2ab3885b51
1 changed files with 6 additions and 6 deletions
|
@ -35,7 +35,11 @@ interface NavbarState {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleCollapseClick(i: Navbar) {
|
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();
|
i.collapseButtonRef.current?.click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,12 +80,8 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
|
||||||
document.removeEventListener("mouseup", this.handleOutsideMenuClick);
|
document.removeEventListener("mouseup", this.handleOutsideMenuClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO class active corresponding to current pages
|
||||||
render() {
|
render() {
|
||||||
return this.navbar();
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO class active corresponding to current page
|
|
||||||
navbar() {
|
|
||||||
const siteView = this.props.siteRes?.site_view;
|
const siteView = this.props.siteRes?.site_view;
|
||||||
const person = UserService.Instance.myUserInfo?.local_user_view.person;
|
const person = UserService.Instance.myUserInfo?.local_user_view.person;
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue