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

@ -29,17 +29,16 @@
</div>
<script>
import {
paused,
canPrevious,
canNext,
selectPrevious,
selectNext,
loading
} from '/store.js'
import { getContext } from 'svelte'
import Volume from '/components/Volume'
import PlayPause from '/components/icons/controls/PlayPause'
import Prev from '/components/icons/controls/Prev'
import Next from '/components/icons/controls/Next'
import IconMenu from '/components/icons/Menu'
const paused = getContext('paused')
const canPrevious = getContext('canPrevious')
const canNext = getContext('canNext')
const selectPrevious = getContext('selectPrevious')
const selectNext = getContext('selectNext')
</script>