]> Untitled Git - lemmy.git/commitdiff
Removing button wrapper for comment context. Fixes #702
authorDessalines <tyhou13@gmx.com>
Fri, 8 May 2020 17:36:52 +0000 (13:36 -0400)
committerDessalines <tyhou13@gmx.com>
Fri, 8 May 2020 17:36:52 +0000 (13:36 -0400)
ui/src/components/comment-node.tsx

index ba4301e169a0475d9c69c6a9b71b48d4a7b01216..4a063307c1a570d606ef1b491a77dbd2234d0423 100644 (file)
@@ -142,9 +142,11 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
           }
         >
           <div
-            class={`${!this.props.noIndent &&
+            class={`${
+              !this.props.noIndent &&
               this.props.node.comment.parent_id &&
-              'ml-2'}`}
+              'ml-2'
+            }`}
           >
             <div class="d-flex flex-wrap align-items-center mb-1 mt-1 text-muted small">
               <span class="mr-2">
@@ -249,8 +251,9 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                         this.loadingIcon
                       ) : (
                         <svg
-                          class={`icon icon-inline ${node.comment.read &&
-                            'text-success'}`}
+                          class={`icon icon-inline ${
+                            node.comment.read && 'text-success'
+                          }`}
                         >
                           <use xlinkHref="#icon-check"></use>
                         </svg>
@@ -302,8 +305,9 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                           this.loadingIcon
                         ) : (
                           <svg
-                            class={`icon icon-inline ${node.comment.saved &&
-                              'text-warning'}`}
+                            class={`icon icon-inline ${
+                              node.comment.saved && 'text-warning'
+                            }`}
                           >
                             <use xlinkHref="#icon-star"></use>
                           </svg>
@@ -350,8 +354,9 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                             data-tippy-content={i18n.t('view_source')}
                           >
                             <svg
-                              class={`icon icon-inline ${this.state
-                                .viewSource && 'text-success'}`}
+                              class={`icon icon-inline ${
+                                this.state.viewSource && 'text-success'
+                              }`}
                             >
                               <use xlinkHref="#icon-file-text"></use>
                             </svg>
@@ -380,8 +385,9 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                 }
                               >
                                 <svg
-                                  class={`icon icon-inline ${node.comment
-                                    .deleted && 'text-danger'}`}
+                                  class={`icon icon-inline ${
+                                    node.comment.deleted && 'text-danger'
+                                  }`}
                                 >
                                   <use xlinkHref="#icon-trash"></use>
                                 </svg>
@@ -700,19 +706,15 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
   get linkBtn() {
     let node = this.props.node;
     return (
-      <button className="btn btn-link btn-animate">
-        <Link
-          class="text-muted"
-          to={`/post/${node.comment.post_id}/comment/${node.comment.id}`}
-          title={
-            this.props.showContext ? i18n.t('show_context') : i18n.t('link')
-          }
-        >
-          <svg class="icon icon-inline">
-            <use xlinkHref="#icon-link"></use>
-          </svg>
-        </Link>
-      </button>
+      <Link
+        class="btn btn-link btn-animate text-muted"
+        to={`/post/${node.comment.post_id}/comment/${node.comment.id}`}
+        title={this.props.showContext ? i18n.t('show_context') : i18n.t('link')}
+      >
+        <svg class="icon icon-inline">
+          <use xlinkHref="#icon-link"></use>
+        </svg>
+      </Link>
     );
   }