]> Untitled Git - lemmy-ui.git/commitdiff
Clicking "subscribe pending" button performs unsubscribe (fixes #705) (#706)
authorNutomic <me@nutomic.com>
Mon, 11 Jul 2022 18:07:47 +0000 (18:07 +0000)
committerGitHub <noreply@github.com>
Mon, 11 Jul 2022 18:07:47 +0000 (14:07 -0400)
src/shared/components/community/sidebar.tsx

index 0f49ca1775e5e7b32b8c9b12b035af6301743d55..109b629b9928c6930849fefc727ac7273e8ea786 100644 (file)
@@ -130,9 +130,13 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
             </a>
           )}
           {subscribed == SubscribedType.Pending && (
-            <div class="badge badge-warning mr-2">
+            <a
+              class="btn btn-warning mr-2"
+              href="#"
+              onClick={linkEvent(this, this.handleUnsubscribe)}
+            >
               {i18n.t("subscribe_pending")}
-            </div>
+            </a>
           )}
           {community.removed && (
             <small className="mr-2 text-muted font-italic">