From ec423572aaf8ecf80a409fd9a03d73b5d31e444f Mon Sep 17 00:00:00 2001
From: Blaster4385 <venkateshchaturvedi12@gmail.com>
Date: Sat, 13 Aug 2022 21:40:17 +0530
Subject: Implemented update UI

---
 client/src/pages/Update/Biometric/Biometric.jsx | 48 +++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 client/src/pages/Update/Biometric/Biometric.jsx

(limited to 'client/src/pages/Update/Biometric/Biometric.jsx')

diff --git a/client/src/pages/Update/Biometric/Biometric.jsx b/client/src/pages/Update/Biometric/Biometric.jsx
new file mode 100644
index 0000000..c105ad8
--- /dev/null
+++ b/client/src/pages/Update/Biometric/Biometric.jsx
@@ -0,0 +1,48 @@
+import React, { useState } from 'react'
+import SubmitButton from '../../../components/SubmitButton/SubmitButton'
+import PhotoCapture from '../PhotoCapture/PhotoCapture'
+import Fingerprint from '../Fingerprint/Fingerprint'
+import IrisScan from '../IrisScan/IrisScan'
+import BiometricSelect from '../BiometricSelect/BiometricSelect'
+
+const Biometric = () => {
+  const [page, setPage] = useState(4)
+
+  const [formData, setFormData] = useState({
+    photo: '',
+    irisScan: '',
+    fingerPrint: ''
+  })
+
+  const conditionalComponent = () => {
+    switch (page) {
+      case 0:
+        return <PhotoCapture formData={formData} setFormData={setFormData} />
+      case 1:
+        return <Fingerprint formData={formData} setFormData={setFormData} />
+      case 2:
+        return <IrisScan formData={formData} setFormData={setFormData} />
+      default:
+        return <BiometricSelect page={page} setPage={setPage} />
+    }
+  }
+
+  const conditionalButton = () => {
+    switch (page) {
+      case 0:
+        return <SubmitButton onClick={() => setPage(4)}>Next</SubmitButton>
+      case 1:
+        return <SubmitButton onClick={() => setPage(4)}>Next</SubmitButton>
+      case 2:
+        return <SubmitButton onClick={() => setPage(4)}>Next</SubmitButton>
+    }
+  }
+  return (
+    <>
+      {conditionalComponent()}
+      {conditionalButton()}
+    </>
+  )
+}
+
+export default Biometric
-- 
cgit 

