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 2cf117b3c5
commit 587a9f7889

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