mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
[Glitch] Add a hashtag public link to the trending hashtag page
Port 52813830bee5607332b49bee2916956286ec5dc1 to glitch-soc Co-authored-by: Claire <claire.github-309c@sitedethib.com> Co-authored-by: Eugen Rochko <eugen@zeonfederated.com> Co-authored-by: Claire <claire.github-309c@sitedethib.com> Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
aaa9ec340b
commit
a4e1830b5f
@ -33,6 +33,7 @@ export default class Counter extends React.PureComponent {
|
|||||||
label: PropTypes.string.isRequired,
|
label: PropTypes.string.isRequired,
|
||||||
href: PropTypes.string,
|
href: PropTypes.string,
|
||||||
params: PropTypes.object,
|
params: PropTypes.object,
|
||||||
|
target: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
@ -54,7 +55,7 @@ export default class Counter extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { label, href } = this.props;
|
const { label, href, target } = this.props;
|
||||||
const { loading, data } = this.state;
|
const { loading, data } = this.state;
|
||||||
|
|
||||||
let content;
|
let content;
|
||||||
@ -100,7 +101,7 @@ export default class Counter extends React.PureComponent {
|
|||||||
|
|
||||||
if (href) {
|
if (href) {
|
||||||
return (
|
return (
|
||||||
<a href={href} className='sparkline'>
|
<a href={href} className='sparkline' target={target}>
|
||||||
{inner}
|
{inner}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user