Change in-app links to keep you in-app (#20540)
* Change in-app links to keep you in-app * refactor Permalink into Link * rewrite link hrefs in status content * please linter * please linter again
This commit is contained in:
parent
ad66bbed62
commit
07229089a6
21 changed files with 52 additions and 94 deletions
|
@ -4,16 +4,15 @@ import { Link, withRouter } from 'react-router-dom';
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
import { registrationsOpen, me } from 'mastodon/initial_state';
|
||||
import Avatar from 'mastodon/components/avatar';
|
||||
import Permalink from 'mastodon/components/permalink';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
const Account = connect(state => ({
|
||||
account: state.getIn(['accounts', me]),
|
||||
}))(({ account }) => (
|
||||
<Permalink href={account.get('url')} to={`/@${account.get('acct')}`} title={account.get('acct')}>
|
||||
<Link to={`/@${account.get('acct')}`} title={account.get('acct')}>
|
||||
<Avatar account={account} size={35} />
|
||||
</Permalink>
|
||||
</Link>
|
||||
));
|
||||
|
||||
export default @withRouter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue