aboutsummaryrefslogtreecommitdiff
path: root/src/stores/animeLastPrune.ts
blob: f2e747d1274edc21c1f88f3380ac058a0759ac51 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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;