Add production mode to docker
This commit is contained in:
parent
32c3debad4
commit
4338b11939
4 changed files with 27 additions and 14 deletions
16
components/webcamPhoto.tsx
Normal file
16
components/webcamPhoto.tsx
Normal file
|
@ -0,0 +1,16 @@
|
|||
import Webcam from 'react-webcam'
|
||||
import { useRef } from 'react'
|
||||
import { IconCamera } from '@tabler/icons-react'
|
||||
|
||||
export default function WebcamPhoto({ onPhoto }:any){
|
||||
const webcamRef = useRef<any>()
|
||||
function takePicture(){
|
||||
const image = webcamRef.current!.getScreenshot()
|
||||
onPhoto(image)
|
||||
}
|
||||
|
||||
return <>
|
||||
<Webcam videoConstraints={{ facingMode: "user" }} ref={webcamRef} />
|
||||
<button className="btn btn-primary" onClick={takePicture}><IconCamera /></button>
|
||||
</>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue