diff options
author | Rohan Raj Gupta <[email protected]> | 2022-08-25 11:49:31 +0530 |
---|---|---|
committer | GitHub <[email protected]> | 2022-08-25 11:49:31 +0530 |
commit | 772fc663fd31bc247dcc7da31090234b5b89f155 (patch) | |
tree | 266005279ac7996b479e2cb3b5d48ccebd041290 /client/src/pages/Update/Agreement/Agreement.jsx | |
parent | 3450e5ad9c59403b9ad75aa24e71a1b925f7bbcf (diff) | |
parent | fcc4c3374d85b33755f852bcc559db0a8eb5115a (diff) |
Merge pull request #14 from Blaster4385/develop
Misc changes and add more translation
Diffstat (limited to 'client/src/pages/Update/Agreement/Agreement.jsx')
-rw-r--r-- | client/src/pages/Update/Agreement/Agreement.jsx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/client/src/pages/Update/Agreement/Agreement.jsx b/client/src/pages/Update/Agreement/Agreement.jsx index 22ffa80..720d8a0 100644 --- a/client/src/pages/Update/Agreement/Agreement.jsx +++ b/client/src/pages/Update/Agreement/Agreement.jsx @@ -13,6 +13,8 @@ import { useMutation } from 'react-query' import { ToastContainer, toast } from 'react-toastify' import PopUpModal from '../../../components/Modal/Modal' import 'react-toastify/dist/ReactToastify.css' +import Error from '../../Error/Error' +import Spinner from '../../../components/Spinner/Spinner' const Agreement = () => { const { t } = useTranslation() @@ -32,6 +34,12 @@ const Agreement = () => { mobile: `+91${userData.mobile}`, id: userData._id }) + }, + onLoading: () => { + return <Spinner heading='UPDATE' /> + }, + onError: () => { + return <Error message={t('SOMETHING_WENT_WRONG_PLEASE_TRY_AGAIN')} /> } } ) @@ -73,6 +81,8 @@ const Agreement = () => { }, 30000) } + const description = ['CLICK_ON_SEND_OTP', 'YOU_WILL_RECIEVE_AN_OTP_ON_YOUR_MOBILE_NUMBER', 'YOU_CAN_RESEND_THE_OTP_AFTER_30_SECONDS_IF_YOU_HAVENT_RECEIVED_IT_YET', 'CLICK_ON_VERIFY_OTP_TO_VERIFY_YOUR_MOBILE_NUMBER'] + return ( <> <ToastContainer @@ -82,22 +92,12 @@ const Agreement = () => { /> <Header subheading={t('ENROLLMENT')} /> <PopUpModal - title="Verify your mobile number" + title="VERIFY_YOUR_MOBILE_NUMBER" image={`${process.env.PUBLIC_URL}/assets/images/agreement.svg`} description={ <> <ul> - <li className="list__item">Click on "SEND OTP"</li> - <li className="list__item"> - You will recieve an OTP on your entered mobile number - </li> - <li className="list__item"> - You can "RESEND" the OTP after 30 seconds, if you - haven't received it yet. - </li> - <li className="list__item"> - Click on "VERIFY OTP" to verify your mobile number - </li> + {description.map((item) => (<li className="list__item" key='id'>{t(item)}</li>))} </ul> </> } |