mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
Undo read from local storage for the time being.
This commit is contained in:
parent
470c0b051e
commit
6973c09b32
1 changed files with 10 additions and 8 deletions
|
|
@ -12,13 +12,15 @@
|
|||
import '$root/styles/styles.scss';
|
||||
import Toast from '$lib/components/toast/Toast.svelte';
|
||||
|
||||
if (browser) {
|
||||
const collection = JSON.parse(localStorage.collection);
|
||||
console.log('collection', collection);
|
||||
if (collection) {
|
||||
collectionStore.addAll(collection);
|
||||
}
|
||||
}
|
||||
// let collectionEmpty = $collectionStore.length === 0 || false;
|
||||
// console.log('collectionEmpty', collectionEmpty);
|
||||
// if (browser && collectionEmpty) {
|
||||
// const collection = JSON.parse(localStorage.collection);
|
||||
// console.log('collection', collection);
|
||||
// if (collection && collection.length !== 0) {
|
||||
// collectionStore.addAll(collection);
|
||||
// }
|
||||
// }
|
||||
|
||||
const dev = process.env.NODE_ENV !== 'production';
|
||||
</script>
|
||||
|
|
@ -56,7 +58,7 @@
|
|||
<div class="background" />
|
||||
</Portal>
|
||||
{/if}
|
||||
<Toast duration={3000} />
|
||||
<Toast />
|
||||
</Transition>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
|||
Loading…
Reference in a new issue