mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 11:51:08 +00:00
Fix navigating to your own user page from another (top right nav)
- Fixes #331
This commit is contained in:
parent
2cf117b3c5
commit
587a9f7889
1 changed files with 8 additions and 0 deletions
8
ui/src/components/user.tsx
vendored
8
ui/src/components/user.tsx
vendored
|
@ -178,6 +178,14 @@ export class User extends Component<any, UserState> {
|
|||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(lastProps: any, _lastState: UserState, _snapshot: any) {
|
||||
// Necessary if you are on a post and you click another post (same route)
|
||||
if (lastProps.location.pathname !== lastProps.history.location.pathname) {
|
||||
// Couldnt get a refresh working. This does for now.
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div class="container">
|
||||
|
|
Loading…
Reference in a new issue