mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Fix navigating to your own user page from another (top right nav)
- Fixes #331
This commit is contained in:
parent
2cf117b3c5
commit
587a9f7889
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 New Issue
Block a user