hopefully make the page load faster
All checks were successful
deploy / deploy (push) Successful in 53s
All checks were successful
deploy / deploy (push) Successful in 53s
This commit is contained in:
parent
af4c117894
commit
2303409ecb
@ -21,6 +21,7 @@ export default class AppProvider extends React.Component {
|
|||||||
}
|
}
|
||||||
this._state.mounted = true;
|
this._state.mounted = true;
|
||||||
|
|
||||||
|
const initUpdater = async () => {
|
||||||
// Load data from async storage
|
// Load data from async storage
|
||||||
await useSettingsStore.persist.rehydrate();
|
await useSettingsStore.persist.rehydrate();
|
||||||
await useScoresaberScoresStore.persist.rehydrate();
|
await useScoresaberScoresStore.persist.rehydrate();
|
||||||
@ -34,6 +35,9 @@ export default class AppProvider extends React.Component {
|
|||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
useScoresaberScoresStore.getState().updatePlayerScores();
|
useScoresaberScoresStore.getState().updatePlayerScores();
|
||||||
}, UPDATE_INTERVAL);
|
}, UPDATE_INTERVAL);
|
||||||
|
};
|
||||||
|
|
||||||
|
initUpdater();
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(props: any) {
|
constructor(props: any) {
|
||||||
|
Loading…
Reference in New Issue
Block a user