Improved Comment URL Handling (#1860)

* feat: replaces PR 1819

- fixes #1851

* fix: set query using new syntax

* review: fixes for missed framework changes

* fix: linting
This commit is contained in:
Wyatt Johnson
2018-09-11 22:44:23 +00:00
committed by GitHub
parent 13cc80bd35
commit c19d4a433a
14 changed files with 246 additions and 38 deletions
@@ -9,6 +9,7 @@ import cn from 'classnames';
import { getTotalReactionsCount } from 'coral-framework/utils';
import t from 'coral-framework/services/i18n';
import { buildCommentURL } from 'coral-framework/utils/url';
class Comment extends React.Component {
render() {
@@ -79,9 +80,10 @@ class Comment extends React.Component {
<li>
<a
className={styles.viewLink}
href={`${this.props.comment.asset.url}?commentId=${
href={buildCommentURL(
this.props.comment.asset.url,
this.props.comment.id
}`}
)}
target="_parent"
>
<Icon name="open_in_new" className={styles.iconView} />