aboutsummaryrefslogtreecommitdiff
path: root/src/stores/mangaLastPrune.ts
blob: f6b40b0217d963cd4f6a8ba56ad69a9139c06ede (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 mangaLastPrune = writable<string>(
	browser ? localStorage.getItem('mangaLastPrune') ?? '' : ''
);

mangaLastPrune.subscribe((value) => {
	if (browser) {
		localStorage.setItem('mangaLastPrune', value);
	}
});

export default mangaLastPrune;