diff --git a/src/features/AdditionalPages/ContactUsPage/MainBlock/ContactForm/ContactForm.component.tsx b/src/app/common/components/ContactForm/ContactForm.component.tsx similarity index 82% rename from src/features/AdditionalPages/ContactUsPage/MainBlock/ContactForm/ContactForm.component.tsx rename to src/app/common/components/ContactForm/ContactForm.component.tsx index 59a681391..4bebf8b19 100644 --- a/src/features/AdditionalPages/ContactUsPage/MainBlock/ContactForm/ContactForm.component.tsx +++ b/src/app/common/components/ContactForm/ContactForm.component.tsx @@ -10,7 +10,7 @@ import Email from '@/models/email/email.model'; const MAX_SYMBOLS = 500; -const ContactForm = () => { +const ContactForm = ({ customClass = "" }) => { const [formData, setFormData] = useState({ email: '', message: '' }); const [isVerified, setIsVerified] = useState(false); const messageLength = formData.message.length | 0; @@ -25,27 +25,27 @@ const ContactForm = () => { if (isVerified) { const newEmail: Email = { from: formData.email, content: formData.message }; EmailApi.send(newEmail) - .then(successMessage) - .catch(errorMessage); + .then(successMessage) + .catch(errorMessage); } }; const successMessage = () => { messageApi.open({ - type: 'success', - content: 'Лист успішно надісланий', + type: 'success', + content: 'Лист успішно надісланий', }); }; const errorMessage = () => { messageApi.open({ - type: 'error', - content: 'Щось пішло не так...', + type: 'error', + content: 'Щось пішло не так...', }); }; return ( -
- {messageLength} + {messageLength} / {MAX_SYMBOLS}