/* eslint-disable multiline-ternary */ import React, { useState } from 'react' import Webcam from 'react-webcam' import { useNavigate } from 'react-router-dom' import Header from '../../../components/Header/Header' import SubmitButton from '../../../components/SubmitButton/SubmitButton' import styles from './PhotoCapture.module.css' import { Button, Grid, Typography } from '@mui/material' const PhotoCapture = () => { const [photo, setPhoto] = useState() const navigate = useNavigate() const webcamRef = React.useRef(null) const capture = React.useCallback(() => { const imageSrc = webcamRef.current.getScreenshot() setPhoto(imageSrc) }) return ( <>
{photo === '' ? ( ) : ( )}


Please look into the camera

Click Capture to Capture the photo

Click Reset the remove the captured photo
navigate('/enrollment/documents')} /> ) } export default PhotoCapture