summaryrefslogtreecommitdiffstats
path: root/ui/src/components/comment-node.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-05-08 13:36:52 -0400
committerDessalines <tyhou13@gmx.com>2020-05-08 14:02:29 -0400
commit9bc45def17a16d383d0909fb61a4b928504950f5 (patch)
tree15c498f426285c6c6c45963995b967dc24f9c5ac /ui/src/components/comment-node.tsx
parent88e1251d6b26411e4253027510e59a06caa72bfe (diff)
Removing button wrapper for comment context. Fixes #702
Diffstat (limited to 'ui/src/components/comment-node.tsx')
-rw-r--r--ui/src/components/comment-node.tsx48
1 files changed, 25 insertions, 23 deletions
diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx
index ba4301e1..4a063307 100644
--- a/ui/src/components/comment-node.tsx
+++ b/ui/src/components/comment-node.tsx
@@ -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>
);
}