import Webcam from 'react-webcam' import { useRef } from 'react' import { IconCamera } from '@tabler/icons-react' export default function WebcamPhoto({ onPhoto }:any){ const webcamRef = useRef() function takePicture(){ const image = webcamRef.current!.getScreenshot() onPhoto(image) } return <> }