Add a hashtag public link to the trending hashtag page (#17140)
* Add a hashtag public link to the hashtag management page * Add support for element 'target' to Counter.js. Remove 'rel' element. * Update app/javascript/mastodon/components/admin/Counter.js Co-authored-by: Claire <[email protected]> Co-authored-by: Eugen Rochko <[email protected]> Co-authored-by: Claire <[email protected]>
This commit is contained in:
co-authored by
Eugen Rochko
Claire
parent
6907605026
commit
52813830be
@@ -33,6 +33,7 @@ export default class Counter extends React.PureComponent {
|
||||
label: PropTypes.string.isRequired,
|
||||
href: PropTypes.string,
|
||||
params: PropTypes.object,
|
||||
target: PropTypes.string,
|
||||
};
|
||||
|
||||
state = {
|
||||
@@ -54,7 +55,7 @@ export default class Counter extends React.PureComponent {
|
||||
}
|
||||
|
||||
render () {
|
||||
const { label, href } = this.props;
|
||||
const { label, href, target } = this.props;
|
||||
const { loading, data } = this.state;
|
||||
|
||||
let content;
|
||||
@@ -100,7 +101,7 @@ export default class Counter extends React.PureComponent {
|
||||
|
||||
if (href) {
|
||||
return (
|
||||
<a href={href} className='sparkline'>
|
||||
<a href={href} className='sparkline' target={target}>
|
||||
{inner}
|
||||
</a>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user