mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 04:00:33 +08:00
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:
@@ -2,6 +2,7 @@ import React from 'react';
|
||||
import cn from 'classnames';
|
||||
import styles from './styles.css';
|
||||
import { t } from 'plugin-api/beta/client/services';
|
||||
import { buildCommentURL } from 'plugin-api/beta/client/utils';
|
||||
import { ClickOutside } from 'plugin-api/beta/client/components';
|
||||
import { Icon, Button } from 'plugin-api/beta/client/components/ui';
|
||||
|
||||
@@ -90,7 +91,7 @@ export default class PermalinkButton extends React.Component {
|
||||
className={cn(styles.input, `${name}-copy-field`)}
|
||||
type="text"
|
||||
ref={input => (this.permalinkInput = input)}
|
||||
defaultValue={`${asset.url}?commentId=${comment.id}`}
|
||||
defaultValue={buildCommentURL(asset.url, comment.id)}
|
||||
readOnly
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user