summaryrefslogtreecommitdiff
path: root/app/lib/camera/hooks/useCameraStore.ts
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2024-10-21 14:54:11 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2024-10-21 14:54:11 +0700
commit83d1a1c558293e1b14c9a5847628e7661f749c66 (patch)
tree5f083f90192df0fc2aff41e3dd1c3c84f2592352 /app/lib/camera/hooks/useCameraStore.ts
parent30c5eb5776fcc60f023ad6aa51153cb375c87930 (diff)
initial commit
Diffstat (limited to 'app/lib/camera/hooks/useCameraStore.ts')
-rw-r--r--app/lib/camera/hooks/useCameraStore.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/lib/camera/hooks/useCameraStore.ts b/app/lib/camera/hooks/useCameraStore.ts
new file mode 100644
index 0000000..c922d1c
--- /dev/null
+++ b/app/lib/camera/hooks/useCameraStore.ts
@@ -0,0 +1,22 @@
+// 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
+}
+
+const useCameraStore = create<CameraStore>((set) => ({
+ barcode: null,
+ setBarcode: (barcode: string) => set({ barcode: barcode }),
+ imageSj: null,
+ setImageSj: (image: string) => set({ imageSj: image }),
+ imagePackage: null,
+ setImagePackage: (image: string) => set({ imagePackage: image }),
+}))
+
+export default useCameraStore \ No newline at end of file