pronounscc/frontend/src/lib/store.ts

17 lines
502 B
TypeScript
Raw Normal View History

2023-03-09 17:08:43 +01:00
import { writable } from "svelte/store";
2023-03-11 16:52:48 +01:00
import { browser } from "$app/environment";
2023-03-09 17:08:43 +01:00
import type { MeUser } from "./api/entities";
const initialUserValue = null;
export const userStore = writable<MeUser | null>(initialUserValue);
2023-03-11 16:52:48 +01:00
2023-04-20 09:29:47 +02:00
const defaultThemeValue = "dark";
2023-03-11 16:52:48 +01:00
const initialThemeValue = browser
? window.localStorage.getItem("pronouns-theme") ?? defaultThemeValue
: defaultThemeValue;
export const themeStore = writable<string>(initialThemeValue);
2023-04-20 10:28:07 +02:00
export const CURRENT_CHANGELOG = "0.4.0";