Browse Source

Merge branch 'main' into dev

feature/static-downtime-page
eiknat 2 years ago
parent
commit
9b98b4288e
  1. 13
      src/components/user.tsx

13
src/components/user.tsx

@ -339,6 +339,19 @@ class BaseUser extends Component<any, UserState> {
// Couldnt get a refresh working. This does for now.
location.reload();
}
const prev = lastProps.location.pathname.split('/')[4];
const next = lastProps.history.location.pathname.split('/')[4];
if (prev && next && prev !== next) {
if (
// eslint-disable-next-line prettier/prettier
UserDetailsView[capitalizeFirstLetter(prev)] === UserDetailsView.Saved ||
UserDetailsView[capitalizeFirstLetter(next)] === UserDetailsView.Saved
) {
this.fetchUserData();
}
}
document.title = `/u/${this.state.username} - ${this.state.site.name}`;
setupTippy();
}

Loading…
Cancel
Save