* Add aliases for some WebUI routes that were renamed in #16171 Accounts and statuses routes need more work as they use different parameters. * Add aliases for /statuses/* routes * Add aliases for /accounts/* WebUI routes Does not correctly set the “active” state on the navigation tabs but this is a minor issue. * Fix some routes * Fix /accounts/:id/{media,followers,following} not loading on legacy routes
This commit is contained in:
@ -20,8 +20,8 @@ import { connectTimeline, disconnectTimeline } from 'mastodon/actions/timelines'
|
||||
|
||||
const emptyList = ImmutableList();
|
||||
|
||||
const mapStateToProps = (state, { params: { acct }, withReplies = false }) => {
|
||||
const accountId = state.getIn(['accounts_map', acct]);
|
||||
const mapStateToProps = (state, { params: { acct, id }, withReplies = false }) => {
|
||||
const accountId = id || state.getIn(['accounts_map', acct]);
|
||||
|
||||
if (!accountId) {
|
||||
return {
|
||||
@ -58,7 +58,8 @@ class AccountTimeline extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
params: PropTypes.shape({
|
||||
acct: PropTypes.string.isRequired,
|
||||
acct: PropTypes.string,
|
||||
id: PropTypes.string,
|
||||
}).isRequired,
|
||||
accountId: PropTypes.string,
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
|
Reference in New Issue
Block a user