onsitesurvey/src/store/spinnerStore.ts
yoosangwook 2c5ddad29b refactor: Enhance survey hook and integrate spinner functionality
- Refactored useSurvey hook to utilize useAxios for API calls.
- Added spinner visibility management in EdgeProvider to improve loading feedback.
- Cleaned up imports and organized code structure for better readability.
2025-05-22 14:08:23 +09:00

22 lines
418 B
TypeScript

import { create } from 'zustand'
type SpinnerState = {
isShow: boolean
setIsShow: (isShow: boolean) => void
resetCount: () => void
}
type InitialState = {
isShow: boolean
}
const initialState: InitialState = {
isShow: false,
}
export const useSpinnerStore = create<SpinnerState>((set) => ({
...initialState,
setIsShow: (isShow: boolean) => set({ isShow }),
resetCount: () => set(initialState),
}))