aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src/stores/GlobalSettings.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/main/src/stores/GlobalSettings.ts')
-rw-r--r--packages/main/src/stores/GlobalSettings.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/main/src/stores/GlobalSettings.ts b/packages/main/src/stores/GlobalSettings.ts
index 1eb13b3..0a54aa3 100644
--- a/packages/main/src/stores/GlobalSettings.ts
+++ b/packages/main/src/stores/GlobalSettings.ts
@@ -19,18 +19,24 @@
19 */ 19 */
20 20
21import { 21import {
22 globalSettings as originalGlobalSettings, 22 GlobalSettings as GlobalSettingsBase,
23 ThemeSource, 23 ThemeSource,
24} from '@sophie/shared'; 24} from '@sophie/shared';
25import { Instance } from 'mobx-state-tree'; 25import { Instance } from 'mobx-state-tree';
26 26
27export const globalSettings = originalGlobalSettings.actions((self) => ({ 27const GlobalSettings = GlobalSettingsBase.actions((self) => ({
28 setThemeSource(mode: ThemeSource): void { 28 setThemeSource(mode: ThemeSource): void {
29 self.themeSource = mode; 29 self.themeSource = mode;
30 }, 30 },
31})); 31}));
32 32
33export interface GlobalSettings extends Instance<typeof globalSettings> {} 33/*
34 eslint-disable-next-line @typescript-eslint/no-redeclare --
35 Intentionally naming the type the same as the store definition.
36*/
37interface GlobalSettings extends Instance<typeof GlobalSettings> {}
38
39export default GlobalSettings;
34 40
35export type { 41export type {
36 GlobalSettingsSnapshotIn, 42 GlobalSettingsSnapshotIn,