diff options
Diffstat (limited to 'client/src/pages/Update')
-rw-r--r-- | client/src/pages/Update/FormOne/FormOne.jsx | 12 | ||||
-rw-r--r-- | client/src/pages/Update/Otp/Otp.jsx | 8 | ||||
-rw-r--r-- | client/src/pages/Update/Update.jsx | 10 |
3 files changed, 21 insertions, 9 deletions
diff --git a/client/src/pages/Update/FormOne/FormOne.jsx b/client/src/pages/Update/FormOne/FormOne.jsx index e0b1ca0..d5fb8ba 100644 --- a/client/src/pages/Update/FormOne/FormOne.jsx +++ b/client/src/pages/Update/FormOne/FormOne.jsx @@ -18,7 +18,17 @@ const FormOne = () => { } useEffect(() => { - document.getElementById(`${userData.gender}`).checked = 'checked' + switch (userData.gender) { + case 'Male': + document.getElementById('male').checked = 'checked' + break + case 'Female': + document.getElementById('female').checked = 'checked' + break + case 'Other': + document.getElementById('other').checked = 'checked' + break + } }, [userData.gender]) return ( diff --git a/client/src/pages/Update/Otp/Otp.jsx b/client/src/pages/Update/Otp/Otp.jsx index 2728ba3..31d8096 100644 --- a/client/src/pages/Update/Otp/Otp.jsx +++ b/client/src/pages/Update/Otp/Otp.jsx @@ -43,13 +43,13 @@ const Otp = () => { } return ( <> - <Header subheading="Update" /> + <Header subheading={`${t('UPDATE')}`} /> <div className={styles.subheading__container}> - <h3 className={styles.subheading}> Enter OTP </h3> + <h3 className={styles.subheading}> {t('ENTER_OTP')} </h3> <Input type="text" id="aadhaarNumber" - placeholder="Enter One Time Password" + placeholder={`${t('ENTER_OTP')}`} /> <Grid container columnSpacing={10} justifyContent="center"> <Grid item> @@ -60,7 +60,7 @@ const Otp = () => { variant="contained" onClick={() => {}} > - Verify OTP + {t('VERIFY_OTP')} </Button> </Grid> </Grid> diff --git a/client/src/pages/Update/Update.jsx b/client/src/pages/Update/Update.jsx index 63343f1..2ef98ec 100644 --- a/client/src/pages/Update/Update.jsx +++ b/client/src/pages/Update/Update.jsx @@ -5,23 +5,25 @@ import Input from '../../components/Input/Input' import { Grid, Button } from '@mui/material' import { userContext } from '../../context/User' import { useNavigate } from 'react-router-dom' +import { useTranslation } from 'react-i18next' const Update = () => { const { aadhaarNumber, setAadhaarNumber } = userContext() const navigate = useNavigate() + const { t } = useTranslation() return ( <> - <Header subheading="Update" /> + <Header subheading={`${t('UPDATE')}`} /> <div className={styles.subheading__container}> - <h3 className={styles.subheading}> Provide Aadhaar Number (UID): </h3> + <h3 className={styles.subheading}> {t('PROVIDE_AADHAAR_NUMBER')} </h3> <Input type="text" id="aadhaarNumber" value={aadhaarNumber} onChange={(e) => setAadhaarNumber(e.target.value)} - placeholder="Enter your Aadhaar Number" + placeholder={`${t('ENTER_YOUR_AADHAAR_NUMBER')}`} required /> <Grid container columnSpacing={10} justifyContent="center"> @@ -35,7 +37,7 @@ const Update = () => { navigate('/update/otp') }} > - Submit + {t('SUBMIT')} </Button> </Grid> </Grid> |