feat(core): introduce reactive services loading mechanism

This commit is contained in:
Samuel Andert
2023-07-26 16:36:08 +02:00
parent 979251bd6b
commit a3761140bd
2 changed files with 18 additions and 15 deletions

View File

@ -1,20 +1,12 @@
<script>
import { onMount } from 'svelte';
export let services;
export let store;
let isServicesLoaded = false;
let isStoreLoaded = false;
onMount(async () => {
// Check services loading
if (services.helloEarthAlert) {
// services.helloEarthAlert.alertMe();
isServicesLoaded = true;
} else {
console.error('helloEarthAlert not loaded');
}
});
$: if (services && services.helloEarthAlert) {
// services.helloEarthAlert.alertMe();
}
$: if ($store) isStoreLoaded = true;
</script>