aboutsummaryrefslogtreecommitdiff
path: root/src/stores/animeLastPrune.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/animeLastPrune.ts')
-rw-r--r--src/stores/animeLastPrune.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/stores/animeLastPrune.ts b/src/stores/animeLastPrune.ts
new file mode 100644
index 00000000..f2e747d1
--- /dev/null
+++ b/src/stores/animeLastPrune.ts
@@ -0,0 +1,14 @@
+import { browser } from '$app/environment';
+import { writable } from 'svelte/store';
+
+const animeLastPrune = writable<string>(
+ browser ? localStorage.getItem('animeLastPrune') ?? '' : ''
+);
+
+animeLastPrune.subscribe((value) => {
+ if (browser) {
+ localStorage.setItem('animeLastPrune', value);
+ }
+});
+
+export default animeLastPrune;