mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 11:57:17 +00:00
14 lines
354 B
TypeScript
14 lines
354 B
TypeScript
import { create } from 'zustand'
|
|
|
|
type UploadStore = {
|
|
uploading: number
|
|
increment: () => void
|
|
decrement: () => void
|
|
}
|
|
|
|
export const useUploadStore = create<UploadStore>((set) => ({
|
|
uploading: 0,
|
|
increment: () => set((state) => ({ uploading: state.uploading + 1 })),
|
|
decrement: () => set((state) => ({ uploading: state.uploading - 1 })),
|
|
}))
|