12 lines
258 B
TypeScript
12 lines
258 B
TypeScript
import { create } from 'zustand'
|
|
|
|
interface GlobalState {
|
|
loading: boolean
|
|
setLoading: (loading: boolean) => void
|
|
}
|
|
|
|
export const useGlobalState = create<GlobalState>((set) => ({
|
|
loading: true,
|
|
setLoading: (loading: boolean) => set({ loading }),
|
|
}))
|