From 1d0e96dbc4e93a52a1ff1f15428d5a3a6f873502 Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Wed, 21 Jun 2023 08:05:32 -0400 Subject: [PATCH] fix: Remove Bootstrap JS in sidebars (#1434) Co-authored-by: Dessalines --- src/shared/components/home/home.tsx | 37 ++++++++++----------- src/shared/components/home/site-sidebar.tsx | 12 +++---- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/src/shared/components/home/home.tsx b/src/shared/components/home/home.tsx index 765dbf03..4270bd0b 100644 --- a/src/shared/components/home/home.tsx +++ b/src/shared/components/home/home.tsx @@ -570,8 +570,6 @@ export class Home extends Component { data-tippy-content={ subscribedCollapsed ? i18n.t("expand") : i18n.t("collapse") } - data-bs-toggle="collapse" - data-bs-target="#sidebarSubscribedBody" aria-expanded="true" aria-controls="sidebarSubscribedBody" > @@ -582,24 +580,25 @@ export class Home extends Component { )} -
-
-
    - {UserService.Instance.myUserInfo?.follows.map(cfv => ( -
  • - -
  • - ))} -
+ {!subscribedCollapsed && ( +
+
+
    + {UserService.Instance.myUserInfo?.follows.map(cfv => ( +
  • + +
  • + ))} +
+
-
+ )} ); } diff --git a/src/shared/components/home/site-sidebar.tsx b/src/shared/components/home/site-sidebar.tsx index 4caeed6b..8f8b177e 100644 --- a/src/shared/components/home/site-sidebar.tsx +++ b/src/shared/components/home/site-sidebar.tsx @@ -42,13 +42,11 @@ export class SiteSidebar extends Component { )} -
-
{this.siteInfo()}
-
+ {!this.state.collapsed && ( +
+
{this.siteInfo()}
+
+ )}
);