mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 04:41:19 +00:00
Fix navigating to your own user page from another (top right nav)
- Fixes #331
This commit is contained in:
parent
eab27c7964
commit
446e2da600
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