summaryrefslogtreecommitdiff
path: root/app/lib/camera/hooks/useCameraStore.ts
blob: ad830744816dc2f475e40c2107307c2465158d88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// store/useCameraStore.ts
import { create } from 'zustand'

interface CameraStore {
    barcode: string | null
    setBarcode: (barcode: string) => void
    imageSj: string | null
    setImageSj: (image: string) => void  
    imagePackage: string | null
    setImagePackage: (image: string) => void
    imageDispatch: string | null
    setImageDispatch: (image: string) => void
}

const useCameraStore = create<CameraStore>((set) => ({
  barcode: '',
  setBarcode: (barcode: string) => set({ barcode: barcode }),
  imageSj: '',
  setImageSj: (image: string) => set({ imageSj: image }),
  imagePackage: '',
  setImagePackage: (image: string) => set({ imagePackage: image }),
  imageDispatch: '',
  setImageDispatch: (image: string) => set({ imageDispatch: image }),
}))

export default useCameraStore