about summary refs log tree commit diff
diff options
context:
space:
mode:
authormayaeh <mayaeh@marimo-net.org>2022-03-26 10:52:51 +0900
committerClaire <claire.github-309c@sitedethib.com>2022-03-26 19:28:48 +0100
commita4e1830b5f15118bf2532401005376a0c6e896e6 (patch)
treee062916928cb4d6642a5f48a1273edc14e59302b
parentaaa9ec340b7291bace3a899cfcfef7524ecdfe72 (diff)
[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>
-rw-r--r--app/javascript/flavours/glitch/components/admin/Counter.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/components/admin/Counter.js b/app/javascript/flavours/glitch/components/admin/Counter.js
index ecb242950..a4d6cef41 100644
--- a/app/javascript/flavours/glitch/components/admin/Counter.js
+++ b/app/javascript/flavours/glitch/components/admin/Counter.js
@@ -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>
       );