fix: auto refresh interval won't be updated (#17112)

* fix: auto refresh interval won't be updated

* leave only cirtical changes
This commit is contained in:
Youkyoung Cha 2021-10-22 18:23:46 +09:00 committed by GitHub
parent 824e62bd1f
commit 35cbcc4643
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,6 +182,13 @@ class Header extends React.PureComponent {
}
}
componentDidUpdate(prevProps) {
if (this.props.refreshFrequency !== prevProps.refreshFrequency) {
const { refreshFrequency } = this.props;
this.startPeriodicRender(refreshFrequency * 1000);
}
}
UNSAFE_componentWillReceiveProps(nextProps) {
const { user } = this.props;
if (