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] 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() {