refactor(web): simplify some stores (#11695)

* refactor(web): simplify some stores

* make writable
This commit is contained in:
Michel Heusschen
2024-08-11 14:01:16 +02:00
committed by GitHub
parent 34c4fbf730
commit efdf8bbca9
5 changed files with 57 additions and 143 deletions

View File

@@ -1,4 +1,4 @@
import { writable } from 'svelte/store';
import { readonly, writable } from 'svelte/store';
function createPurchaseStore() {
const isPurcharsed = writable(false);
@@ -8,9 +8,7 @@ function createPurchaseStore() {
}
return {
isPurchased: {
subscribe: isPurcharsed.subscribe,
},
isPurchased: readonly(isPurcharsed),
setPurchaseStatus,
};
}