Skip to content

Commit

Permalink
Added settings pullstate and settings store (#223)
Browse files Browse the repository at this point in the history
* added pullstate

* ran lint and addressed problems
  • Loading branch information
AaronGibson2 authored Apr 22, 2024
1 parent 5091f05 commit 486ecaa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions client/src/services/SettingsStore.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Store } from "pullstate";

interface SettingsInterface {
isDarkMode: boolean;
}

export const SettingStore = new Store<SettingsInterface>({
isDarkMode: false,
});

export const toggleTheme = async () => {
SettingStore.update((store) => {
store.isDarkMode = !store.isDarkMode;
});
};

0 comments on commit 486ecaa

Please sign in to comment.