summaryrefslogtreecommitdiff
path: root/client/src/pages/Enrollment/PhotoCapture/PhotoCapture.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/pages/Enrollment/PhotoCapture/PhotoCapture.jsx')
-rw-r--r--client/src/pages/Enrollment/PhotoCapture/PhotoCapture.jsx49
1 files changed, 37 insertions, 12 deletions
diff --git a/client/src/pages/Enrollment/PhotoCapture/PhotoCapture.jsx b/client/src/pages/Enrollment/PhotoCapture/PhotoCapture.jsx
index ddd656c..7643f76 100644
--- a/client/src/pages/Enrollment/PhotoCapture/PhotoCapture.jsx
+++ b/client/src/pages/Enrollment/PhotoCapture/PhotoCapture.jsx
@@ -27,6 +27,25 @@ const PhotoCapture = () => {
'YOU_WONT_BE_ABLE_TO_PROCEED_UNTIL_YOU_HAVE_CAPTURED_A_CLEAR_AND_CENTERED_PHOTO'
]
+ const svgIcon = () => (
+ <svg
+ width="100%"
+ height="100%"
+ className="svg"
+ viewBox="0 0 300 200"
+ version="1.1"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlnsXlink="http://www.w3.org/1999/xlink">
+ <defs>
+ <mask id="overlay-mask" x="0" y="0" width="100%" height="100%">
+ <rect x="0" y="0" width="100%" height="100%" fill="#fff" />
+ <circle cx="50%" cy="50%" r="70" />
+ </mask>
+ </defs>
+ <rect x="0" y="0" width="100%" height="100%" mask="url(#overlay-mask)" fillOpacity="0.7" />
+ </svg>
+ )
+
return (
<>
<Header subheading={t('ENROLLMENT')} />
@@ -50,18 +69,24 @@ const PhotoCapture = () => {
/>
<div className={styles.card__container}>
{!userData.photo ? (
- <Webcam
- audio={false}
- height={400}
- ref={webcamRef}
- screenshotFormat="image/jpeg"
- width={600}
- videoConstraints={{
- height: 400,
- width: 600,
- facingMode: 'user'
- }}
- />
+ <div className={styles.webcam__container}>
+ <Webcam
+ audio={false}
+ height={400}
+ ref={webcamRef}
+ screenshotFormat="image/jpeg"
+ width={600}
+ videoConstraints={{
+ height: 400,
+ width: 600,
+ facingMode: 'user'
+ }}
+ />
+ <div className={styles.overlay__container}>
+ {svgIcon()}
+ </div>
+ </div>
+
) : (
<img id="img" src={userData.photo} />
)}