Init globalSettings
This commit is contained in:
parent
1a9d7ac9c8
commit
3772dec6e1
11
contexts/globalSettings.ts
Normal file
11
contexts/globalSettings.ts
Normal file
@ -0,0 +1,11 @@
|
||||
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 })
|
||||
}
|
Loading…
Reference in New Issue
Block a user