From a8339c38c771c136871714547372f65e9cb12810 Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Wed, 28 Jun 2023 11:06:55 -0400 Subject: [PATCH 1/2] make subscribe/unsub/pending button consistent --- src/shared/components/community/sidebar.tsx | 69 ++++++++++++--------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/src/shared/components/community/sidebar.tsx b/src/shared/components/community/sidebar.tsx index d5cf2cb6..163a9dc0 100644 --- a/src/shared/components/community/sidebar.tsx +++ b/src/shared/components/community/sidebar.tsx @@ -176,33 +176,6 @@ export class Sidebar extends Component { - {subscribed === "Subscribed" && ( - - )} - {subscribed === "Pending" && ( - - )} {community.removed && ( {I18NextService.i18n.t("removed")} @@ -259,8 +232,9 @@ export class Sidebar extends Component { subscribe() { const community_view = this.props.community_view; - return ( - community_view.subscribed === "NotSubscribed" && ( + + if (community_view.subscribed === "NotSubscribed") { + return ( - ) - ); + ); + } + + if (community_view.subscribed === "Subscribed") { + return ( + + ); + } + + if (community_view.subscribed === "Pending") { + return ( + + ); + } } blockCommunity() { From 2f3aa5a26d69158f50f2365912b9af0f6eb1ab87 Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Wed, 28 Jun 2023 11:09:52 -0400 Subject: [PATCH 2/2] formatting --- src/shared/components/community/sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/community/sidebar.tsx b/src/shared/components/community/sidebar.tsx index 163a9dc0..fcb0dad7 100644 --- a/src/shared/components/community/sidebar.tsx +++ b/src/shared/components/community/sidebar.tsx @@ -166,7 +166,7 @@ export class Sidebar extends Component { communityTitle() { const community = this.props.community_view.community; - const subscribed = this.props.community_view.subscribed; + return (