diff --git a/src/lib/components/Recipies/LearnColor.svelte b/src/lib/components/Recipies/LearnColor.svelte index 65e7694..ca447b8 100644 --- a/src/lib/components/Recipies/LearnColor.svelte +++ b/src/lib/components/Recipies/LearnColor.svelte @@ -2,15 +2,18 @@ export let services; export let store; + export let machineService; + let childStore; $: if (services.core) { - childStore = services.core.subscribeComposite('@child'); + childStore = services.core.subscribeComposite('@learnready'); } $: { if ($childStore && $childStore.machine.state) { - services.machine.send($childStore.machine.state); + console.log('learn color machine: ' + JSON.stringify(machineService)); + machineService.send($childStore.machine.state); } } @@ -22,4 +25,3 @@ class="p-2 border-2" style="background-color: {$store.machine.state}; border-radius: 50%; width: 50px; height: 50px;" /> -
The child state: {JSON.stringify($childStore)}
diff --git a/src/lib/components/Recipies/LearnReady.svelte b/src/lib/components/Recipies/LearnReady.svelte index a46716f..3d6d860 100644 --- a/src/lib/components/Recipies/LearnReady.svelte +++ b/src/lib/components/Recipies/LearnReady.svelte @@ -1,29 +1,19 @@