Fixing views for remote users. Fixes #120
This commit is contained in:
parent
94e36ad757
commit
8c3c27002b
2 changed files with 11 additions and 1 deletions
|
@ -885,8 +885,13 @@ export class User extends Component<any, UserState> {
|
|||
const page = paramUpdates.page || this.state.page;
|
||||
const viewStr = paramUpdates.view || UserDetailsView[this.state.view];
|
||||
const sortStr = paramUpdates.sort || this.state.sort;
|
||||
|
||||
let typeView = this.state.userName
|
||||
? `/u/${this.state.userName}`
|
||||
: `/user/${this.state.userId}`;
|
||||
|
||||
this.props.history.push(
|
||||
`/u/${this.state.userName}/view/${viewStr}/sort/${sortStr}/page/${page}`
|
||||
`${typeView}/view/${viewStr}/sort/${sortStr}/page/${page}`
|
||||
);
|
||||
this.state.loading = true;
|
||||
this.setState(this.state);
|
||||
|
|
|
@ -92,6 +92,11 @@ export const routes: IRoutePropsWithFetch[] = [
|
|||
component: User,
|
||||
fetchInitialData: req => User.fetchInitialData(req),
|
||||
},
|
||||
{
|
||||
path: `/user/:id/view/:view/sort/:sort/page/:page`,
|
||||
component: User,
|
||||
fetchInitialData: req => User.fetchInitialData(req),
|
||||
},
|
||||
{
|
||||
path: `/user/:id`,
|
||||
component: User,
|
||||
|
|
Loading…
Reference in a new issue