[Glitch] Change routing paths to use usernames in web UI

Port 52e5c07948 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko
2021-09-26 05:46:13 +02:00
committed by Claire
parent 3622110778
commit a7f6524c6b
45 changed files with 385 additions and 198 deletions

View File

@ -19,14 +19,14 @@ export default class StatusHeader extends React.PureComponent {
};
// Handles clicks on account name/image
handleClick = (id, e) => {
handleClick = (acct, e) => {
const { parseClick } = this.props;
parseClick(e, `/accounts/${id}`);
parseClick(e, `/@${acct}`);
}
handleAccountClick = (e) => {
const { status } = this.props;
this.handleClick(status.getIn(['account', 'id']), e);
this.handleClick(status.getIn(['account', 'acct']), e);
}
// Rendering.