-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix merge conflicts. tweak type declarations on src/store
- Loading branch information
1 parent
3426b8d
commit 53306d7
Showing
6 changed files
with
50 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
// | ||
// State Management for settings (button toggles, view toggles, etc.) | ||
// | ||
|
||
// // | ||
// // State Management for settings (button toggles, view toggles, etc.) | ||
// // | ||
// export default useSettingsStore; | ||
import create from 'zustand'; | ||
import { devtools, persist } from 'zustand/middleware'; | ||
|
||
let settingsStore = (set) => ({ | ||
//darkMode state defaults to true | ||
let settingsStore = (set: (arg0: { (state: any): any; (state: any): any; (state: any): any; }) => any) => ({ | ||
darkMode: true, | ||
//toggles darkMode | ||
setSchemaStore: () => set((state) => ({ darkMode: !state.darkMode })), | ||
setDarkMode: () => set((state: { darkMode: any; }) => ({ ...state, darkMode: !state.darkMode })), | ||
|
||
sidebarDisplayState: false, | ||
|
||
welcome: true, | ||
setWelcome: (input: any) => set((state: any) => ({ ...state, welcome: input })), | ||
|
||
editRefMode: false, | ||
setEditRefMode: (input: any) => set((state: any) => ({ ...state, editRefMode: input })), | ||
}); | ||
|
||
settingsStore = devtools(settingsStore); | ||
settingsStore = persist(settingsStore); | ||
const useSettingsStore = create(settingsStore); | ||
// settingsStore = devtools(settingsStore); | ||
const useSettingsStore = create(devtools(settingsStore)); | ||
|
||
export default useSettingsStore; | ||
|
||
|