Use hook properly when doing upgrade check
This commit is contained in:
parent
69d194f20d
commit
b647e7d575
@ -30,8 +30,6 @@ import { TEXTFIELD_PROPS_STREAM_TITLE } from '../utils/config-constants';
|
||||
|
||||
import { UpdateArgs } from '../types/config-section';
|
||||
|
||||
let performedUpgradeCheck = false;
|
||||
|
||||
export default function MainLayout(props) {
|
||||
const { children } = props;
|
||||
|
||||
@ -60,11 +58,8 @@ export default function MainLayout(props) {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!performedUpgradeCheck) {
|
||||
checkForUpgrade();
|
||||
performedUpgradeCheck = true;
|
||||
}
|
||||
});
|
||||
checkForUpgrade();
|
||||
}, [versionNumber]);
|
||||
|
||||
useEffect(() => {
|
||||
setCurrentStreamTitle(instanceDetails.streamTitle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user