about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-01-14 23:29:21 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-01-14 23:29:21 +0100
commit6cfb357940b3855ce53f6d1dfd87b1b32840a302 (patch)
tree4e953849ab0202b6881afce0efeefc6cf07028c9
parentc5b8824a3e5fa43470d12c4ef96eda3e62e10436 (diff)
Make hashtag search results link to the hashtag URL (#9810)
Currently, middle-clicking on a hashtag search result will open a new
instance of the WebUI, which is inconsistent with middle-clicking on
an account result, or a hashtag in a toot.
-rw-r--r--app/javascript/mastodon/components/hashtag.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/mastodon/components/hashtag.js b/app/javascript/mastodon/components/hashtag.js
index a407df31e..f091d7893 100644
--- a/app/javascript/mastodon/components/hashtag.js
+++ b/app/javascript/mastodon/components/hashtag.js
@@ -1,16 +1,16 @@
 import React from 'react';
 import { Sparklines, SparklinesCurve } from 'react-sparklines';
-import { Link } from 'react-router-dom';
 import { FormattedMessage } from 'react-intl';
 import ImmutablePropTypes from 'react-immutable-proptypes';
+import Permalink from './permalink';
 import { shortNumberFormat } from '../utils/numbers';
 
 const Hashtag = ({ hashtag }) => (
   <div className='trends__item'>
     <div className='trends__item__name'>
-      <Link to={`/timelines/tag/${hashtag.get('name')}`}>
+      <Permalink href={hashtag.get('url')} to={`/timelines/tag/${hashtag.get('name')}`}>
         #<span>{hashtag.get('name')}</span>
-      </Link>
+      </Permalink>
 
       <FormattedMessage id='trends.count_by_accounts' defaultMessage='{count} {rawCount, plural, one {person} other {people}} talking' values={{ rawCount: hashtag.getIn(['history', 0, 'accounts']), count: <strong>{shortNumberFormat(hashtag.getIn(['history', 0, 'accounts']))}</strong> }} />
     </div>