Change routing paths to use usernames in web UI (#16171)

This commit is contained in:
Eugen Rochko 2021-09-26 05:46:13 +02:00 committed by GitHub
parent 9c92907681
commit 52e5c07948
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 500 additions and 233 deletions

View file

@ -120,7 +120,7 @@ class Footer extends ImmutablePureComponent {
onClose();
}
router.history.push(`/statuses/${status.get('id')}`);
router.history.push(`/@${status.getIn(['account', 'acct'])}/${status.get('id')}`);
}
render () {

View file

@ -34,7 +34,7 @@ class Header extends ImmutablePureComponent {
return (
<div className='picture-in-picture__header'>
<Link to={`/statuses/${statusId}`} className='picture-in-picture__header__account'>
<Link to={`/@${account.get('acct')}/${statusId}`} className='picture-in-picture__header__account'>
<Avatar account={account} size={36} />
<DisplayName account={account} />
</Link>