22 lines
571 B
TypeScript
22 lines
571 B
TypeScript
import AsyncStorage from '@react-native-async-storage/async-storage'
|
|
import { create } from 'zustand'
|
|
import { createJSONStorage, persist } from 'zustand/middleware'
|
|
|
|
interface AppState {
|
|
themeScheme: ThemeScheme
|
|
setThemeScheme: (theme: ThemeScheme) => void
|
|
}
|
|
|
|
// export const useAppStore = create<AppState>()(
|
|
// persist(
|
|
// set => ({
|
|
// themeScheme: 'system',
|
|
// setThemeScheme: theme => set({ themeScheme: theme }),
|
|
// }),
|
|
// {
|
|
// name: 'app-storage',
|
|
// storage: createJSONStorage(() => AsyncStorage),
|
|
// },
|
|
// ),
|
|
// )
|