stargaze-studio/contexts/globalSettings.ts
2023-08-31 23:37:29 +03:00

12 lines
253 B
TypeScript

import create from 'zustand'
export type Timezone = 'UTC' | 'Local'
export const useGlobalSettings = create(() => ({
timezone: 'UTC' as Timezone,
}))
export const setTimezone = (timezone: Timezone) => {
useGlobalSettings.setState({ timezone })
}