import Webcam from "react-webcam"; import { useRef, useState } from "react"; import React from "react"; import uploadAzure from "../scripts/uploadAzure"; const CustomWebcam = () => { const webcamRef = useRef(null); const [imgSrc, setImgSrc] = useState(null); const isCapture = useState(false) const capture = React.useCallback(() => { if (webcamRef.current != null) { const imageSrc = webcamRef.current.getScreenshot(); setImgSrc(imageSrc); isCapture[1](true) } }, [webcamRef]); return (