refactor(store): use context api for store access

This commit is contained in:
wryk
2020-02-20 15:55:22 +01:00
parent 2a9a02df54
commit 8037bc8711
9 changed files with 147 additions and 114 deletions

View File

@@ -12,8 +12,10 @@
</svg>
<script>
import { volume } from '/store.js'
import { getContext } from 'svelte'
const volume = getContext('volume')
// to fix visual glitch
$: volumePercent = $volume ? $volume -2 : 0
$: volumePercent = $volume - 2
</script>