diff options
| author | trisusilo48 <tri.susilo@altama.co.id> | 2024-10-21 14:54:11 +0700 |
|---|---|---|
| committer | trisusilo48 <tri.susilo@altama.co.id> | 2024-10-21 14:54:11 +0700 |
| commit | 83d1a1c558293e1b14c9a5847628e7661f749c66 (patch) | |
| tree | 5f083f90192df0fc2aff41e3dd1c3c84f2592352 /app/lib/camera/hooks/useCamera.ts | |
| parent | 30c5eb5776fcc60f023ad6aa51153cb375c87930 (diff) | |
initial commit
Diffstat (limited to 'app/lib/camera/hooks/useCamera.ts')
| -rw-r--r-- | app/lib/camera/hooks/useCamera.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/app/lib/camera/hooks/useCamera.ts b/app/lib/camera/hooks/useCamera.ts new file mode 100644 index 0000000..d85d978 --- /dev/null +++ b/app/lib/camera/hooks/useCamera.ts @@ -0,0 +1,32 @@ +import { useState } from "react" + +const useCamera = () => { + + const [imageSJ, setImageSj] = useState<string | null>(null) + const [imagePackage, setImagePackage] = useState<string | null>(null) + const [barcode, setBarcode] = useState<string | null>(null) + + const [isWebcamVisibleSj, setIsWebcamVisibleSJ] = useState<boolean>(false) + const [isWebcamVisiblePackage, setIsWebcamVisiblePackage] = useState<boolean>(false) + + const handleSubmit = () => { + setIsWebcamVisibleSJ(false) + } + + + return { + barcode, + setBarcode, + imageSJ, + imagePackage, + setImageSj, + setImagePackage, + isWebcamVisibleSj, + isWebcamVisiblePackage, + setIsWebcamVisibleSJ, + setIsWebcamVisiblePackage, + handleSubmit + } +} + +export default useCamera
\ No newline at end of file |
