diff options
author | Blaster4385 <[email protected]> | 2022-08-26 09:10:00 +0530 |
---|---|---|
committer | Blaster4385 <[email protected]> | 2022-08-26 09:10:00 +0530 |
commit | 34fc89bef7126966047cd748f94cf24f7a2d0788 (patch) | |
tree | c9c805fedc62d105a4495e2d9e51f0bc2c922457 /client/src/pages/Enrollment/DocumentScanner | |
parent | bdd4ad1b8b071fd04f1025076174757f0f355315 (diff) |
Fix stuff
Diffstat (limited to 'client/src/pages/Enrollment/DocumentScanner')
-rw-r--r-- | client/src/pages/Enrollment/DocumentScanner/DocumentScanner.jsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/pages/Enrollment/DocumentScanner/DocumentScanner.jsx b/client/src/pages/Enrollment/DocumentScanner/DocumentScanner.jsx index 598b8b7..1d7fdc0 100644 --- a/client/src/pages/Enrollment/DocumentScanner/DocumentScanner.jsx +++ b/client/src/pages/Enrollment/DocumentScanner/DocumentScanner.jsx @@ -21,6 +21,7 @@ const DocumentScanner = () => { ] const [documents, setDocuments] = useState({ POI: '', POA: '', DOB: '' }) const [activeStep, setActiveStep] = React.useState(0) + const language = localStorage.getItem('i18nextLng') const [doccu] = useState({ POI: '', POA: '', DOB: '' }) @@ -49,6 +50,13 @@ const DocumentScanner = () => { (!documents.DOB && activeStep === 2) ) { toast.error(t('SCAN_YOUR_DOCUMENT')) + let audio + if (language === 'en') { + audio = new Audio(`${process.env.PUBLIC_URL}/assets/audios/scan-documents-english.mp3`) + } else if (language === 'hi') { + audio = new Audio(`${process.env.PUBLIC_URL}/assets/audios/scan-documents-hindi.mp3`) + } + audio.play() } else { setActiveStep((prevActiveStep) => prevActiveStep + 1) } |