diff options
| author | Fuwn <[email protected]> | 2023-08-26 22:29:03 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-08-26 22:29:03 -0700 |
| commit | b89d0e7dada186e31be37e62a7a75efc2dbe9c99 (patch) | |
| tree | 8c9f6b5d7aa0f709c06d5eb45fbf763883b21c89 /src/stores/lastPruneAt.ts | |
| download | due.moe-b89d0e7dada186e31be37e62a7a75efc2dbe9c99.tar.xz due.moe-b89d0e7dada186e31be37e62a7a75efc2dbe9c99.zip | |
feat: initial build
Diffstat (limited to 'src/stores/lastPruneAt.ts')
| -rw-r--r-- | src/stores/lastPruneAt.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/stores/lastPruneAt.ts b/src/stores/lastPruneAt.ts new file mode 100644 index 00000000..0720bc60 --- /dev/null +++ b/src/stores/lastPruneAt.ts @@ -0,0 +1,12 @@ +import { browser } from '$app/environment'; +import { writable } from 'svelte/store'; + +const lastPruneAt = writable<string>(browser ? localStorage.getItem('lastPruneAt') ?? '' : ''); + +lastPruneAt.subscribe((value) => { + if (browser) { + localStorage.setItem('lastPruneAt', value); + } +}); + +export default lastPruneAt; |