tutu/src/settings/stores.ts

16 lines
283 B
TypeScript
Raw Normal View History

2024-07-14 20:28:44 +08:00
import { persistentMap } from "@nanostores/persistent";
type Settings = {
2024-08-05 15:33:00 +08:00
onGoingOAuth2Process?: string;
prefetchTootsDisabled?: boolean;
};
2024-07-14 20:28:44 +08:00
2024-08-05 15:33:00 +08:00
export const $settings = persistentMap<Settings>(
"settings::",
{},
{
encode: JSON.stringify,
decode: JSON.parse,
},
);