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';
|
import { UpdateArgs } from '../types/config-section';
|
||||||
|
|
||||||
let performedUpgradeCheck = false;
|
|
||||||
|
|
||||||
export default function MainLayout(props) {
|
export default function MainLayout(props) {
|
||||||
const { children } = props;
|
const { children } = props;
|
||||||
|
|
||||||
@ -60,11 +58,8 @@ export default function MainLayout(props) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!performedUpgradeCheck) {
|
checkForUpgrade();
|
||||||
checkForUpgrade();
|
}, [versionNumber]);
|
||||||
performedUpgradeCheck = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setCurrentStreamTitle(instanceDetails.streamTitle);
|
setCurrentStreamTitle(instanceDetails.streamTitle);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user