summaryrefslogtreecommitdiffstats
path: root/ui/src/components/user.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-11-22 16:32:18 -0800
committerDessalines <tyhou13@gmx.com>2019-11-22 16:32:18 -0800
commit587a9f78899da1eae8f3220ee67b2b5d5599625c (patch)
tree2b072223b5d55ccb05a08af5e0409b55f60ca642 /ui/src/components/user.tsx
parent2cf117b3c559a56ef51855150fe2577b7bb8a0ca (diff)
Fix navigating to your own user page from another (top right nav)
- Fixes #331
Diffstat (limited to 'ui/src/components/user.tsx')
-rw-r--r--ui/src/components/user.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx
index 361ce633..84656ce7 100644
--- a/ui/src/components/user.tsx
+++ b/ui/src/components/user.tsx
@@ -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">