0
0
Fork 0

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:
trwnh 2022-11-13 14:10:20 -06:00 committed by GitHub
parent ad66bbed62
commit 07229089a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 52 additions and 94 deletions

View file

@ -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