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

@ -28,9 +28,15 @@
</div>
<script>
import { queue, next, current, enqueueing, select } from '/store.js'
import { getContext } from 'svelte'
import DistanceDate from '/components/DistanceDate.svelte'
const current = getContext('current')
const enqueueing = getContext('enqueueing')
const next = getContext('next')
const queue = getContext('queue')
const select = getContext('select')
$: history = $queue.filter(x => x !== $next).reverse()
</script>