refactor(svelte): cleanup store usage

This commit is contained in:
moklick
2023-02-28 12:43:29 +01:00
parent 7a879f3c54
commit 62a6278682
25 changed files with 420 additions and 397 deletions
@@ -2,15 +2,15 @@
import EdgeWrapper from '$lib/components/edges/EdgeWrapper.svelte';
import { useStore } from '$lib/store';
const { edgesWithDataStore, widthStore, heightStore } = useStore();
const { edgesLayouted, width, height } = useStore();
</script>
<svg
width={$widthStore}
<svg
width={$width}
height={$height}
class="react-flow__edges"
>
>
{#each $edgesLayouted as edge (edge.id)}
<EdgeWrapper {...edge} />
{/each}