]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Add a hashtag public link to the trending hashtag page
authormayaeh <mayaeh@marimo-net.org>
Sat, 26 Mar 2022 01:52:51 +0000 (10:52 +0900)
committerClaire <claire.github-309c@sitedethib.com>
Sat, 26 Mar 2022 18:28:48 +0000 (19:28 +0100)
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>
app/javascript/flavours/glitch/components/admin/Counter.js

index ecb24295095613e27b427ea2880db44b53654417..a4d6cef4122b66956d85c3f187c62cb3dd5ab2c8 100644 (file)
@@ -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>
       );