Fix navigating to your own user page from another (top right nav)

- Fixes #331
This commit is contained in:
Dessalines 2019-11-22 16:32:18 -08:00
parent eab27c7964
commit 446e2da600

View file

@ -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">