From: Dessalines Date: Sat, 23 Nov 2019 00:32:18 +0000 (-0800) Subject: Fix navigating to your own user page from another (top right nav) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%24%7B%60data:application/%22https:/hacktivis.me/%7Bthis.state.user.avatar%7D?a=commitdiff_plain;h=587a9f78899da1eae8f3220ee67b2b5d5599625c;p=lemmy.git Fix navigating to your own user page from another (top right nav) - Fixes #331 --- 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 { } } + 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 (