From 52ea820c5331c01f7913b85a09a7709f50c3fc08 Mon Sep 17 00:00:00 2001 From: DDeviak <117632082+DDeviak@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:11:07 +0300 Subject: [PATCH] chore: Added the `hl` prop with the value 'uk' to the ReCAPTCHA to display it in Ukrainian language --- .../common/components/ContactForm/ContactForm.component.tsx | 3 ++- .../components/modals/Partners/PartnersModal.component.tsx | 3 ++- src/features/AdminPage/Login/AdminLogin.component.tsx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/common/components/ContactForm/ContactForm.component.tsx b/src/app/common/components/ContactForm/ContactForm.component.tsx index 25a584515..30c6ccf7c 100644 --- a/src/app/common/components/ContactForm/ContactForm.component.tsx +++ b/src/app/common/components/ContactForm/ContactForm.component.tsx @@ -18,7 +18,7 @@ interface Props { const ContactForm = forwardRef((customClass: Props, ref) => { const [formData, setFormData] = useState({ email: '', message: '' }); const [isVerified, setIsVerified] = useState(false); - const [messageApi, messageContextHolder] = message.useMessage({maxCount: 3}); + const [messageApi, messageContextHolder] = message.useMessage({ maxCount: 3 }); const [form] = Form.useForm(); const recaptchaRef = useRef(null); const siteKey = window._env_.RECAPTCHA_SITE_KEY; @@ -139,6 +139,7 @@ const ContactForm = forwardRef((customClass: Props, ref) => { onChange={handleVerify} onExpired={handleExpiration} ref={recaptchaRef} + hl='uk' /> diff --git a/src/app/common/components/modals/Partners/PartnersModal.component.tsx b/src/app/common/components/modals/Partners/PartnersModal.component.tsx index 7380f2e32..3259ce363 100644 --- a/src/app/common/components/modals/Partners/PartnersModal.component.tsx +++ b/src/app/common/components/modals/Partners/PartnersModal.component.tsx @@ -25,7 +25,7 @@ const PartnersModal = () => { const { setModal, modalsState: { partners } } = modalStore; const [form] = Form.useForm(); const [formData, setFormData] = useState({ email: '', message: '' }); - const [messageApi, messageContextHolder] = message.useMessage({maxCount: 3}); + const [messageApi, messageContextHolder] = message.useMessage({ maxCount: 3 }); const [isVerified, setIsVerified] = useState(false); const recaptchaRef = useRef(null); const siteKey = window._env_.RECAPTCHA_SITE_KEY; @@ -181,6 +181,7 @@ const PartnersModal = () => { onChange={handleVerify} onExpired={handleExpiration} ref={recaptchaRef} + hl='uk' /> diff --git a/src/features/AdminPage/Login/AdminLogin.component.tsx b/src/features/AdminPage/Login/AdminLogin.component.tsx index e1944ec21..5f16c2838 100644 --- a/src/features/AdminPage/Login/AdminLogin.component.tsx +++ b/src/features/AdminPage/Login/AdminLogin.component.tsx @@ -13,7 +13,7 @@ import { ERROR_MESSAGES, INVALID_LOGIN_ATTEMPT } from '@/app/common/constants/er import FRONTEND_ROUTES from '@/app/common/constants/frontend-routes.constants'; import AuthService from '@/app/common/services/auth-service/AuthService'; -const AdminLogin:React.FC = () => { +const AdminLogin: React.FC = () => { const navigate = useNavigate(); const [form] = Form.useForm(); const [isVerified, setIsVerified] = useState(false); @@ -70,6 +70,7 @@ const AdminLogin:React.FC = () => { onChange={handleVerify} onExpired={handleExpiration} ref={recaptchaRef} + hl='uk' />