/* 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'
import { useTranslation } from 'react-i18next'
const PhotoCapture = () => {
const { t } = useTranslation()
const [photo, setPhoto] = useState()
const navigate = useNavigate()
const webcamRef = React.useRef(null)
const capture = React.useCallback(() => {
const imageSrc = webcamRef.current.getScreenshot()
setPhoto(imageSrc)
})
return (
<>