Fixed issue with profiles not loading when account is not fetched from DB

• Fixed:
- issue with profiles not loading when account is not fetched from DB. Like if on profile then click a account from "x reposted y", x would not load because the ProfilePage component was not fetching on update, only mount.
This commit is contained in:
mgabdev 2020-12-31 17:16:15 -05:00
parent 312289d88a
commit e7993f9550
1 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,12 @@ class ProfilePage extends ImmutablePureComponent {
}
}
componentDidUpdate() {
if (!this.props.account) {
this.props.dispatch(fetchAccountByUsername(this.props.params.username))
}
}
render() {
const {
account,