mirror of
https://github.com/owncast/owncast.git
synced 2024-11-23 05:14:20 +03:00
Use hook properly when doing upgrade check
This commit is contained in:
parent
69d194f20d
commit
b647e7d575
1 changed files with 2 additions and 7 deletions
|
@ -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…
Reference in a new issue