diff --git a/FrontEnd/public/svg/baget.svg b/FrontEnd/public/svg/baget.svg new file mode 100644 index 000000000..c56202f38 --- /dev/null +++ b/FrontEnd/public/svg/baget.svg @@ -0,0 +1,3 @@ + + + diff --git a/FrontEnd/public/svg/car.svg b/FrontEnd/public/svg/car.svg new file mode 100644 index 000000000..23e6ebbf1 --- /dev/null +++ b/FrontEnd/public/svg/car.svg @@ -0,0 +1,3 @@ + + + diff --git a/FrontEnd/public/svg/hotel.svg b/FrontEnd/public/svg/hotel.svg new file mode 100644 index 000000000..f74fcef79 --- /dev/null +++ b/FrontEnd/public/svg/hotel.svg @@ -0,0 +1,3 @@ + + + diff --git a/FrontEnd/public/svg/people.svg b/FrontEnd/public/svg/people.svg new file mode 100644 index 000000000..a729ee4e5 --- /dev/null +++ b/FrontEnd/public/svg/people.svg @@ -0,0 +1,3 @@ + + + diff --git a/FrontEnd/public/svg/post.svg b/FrontEnd/public/svg/post.svg new file mode 100644 index 000000000..71e6ed313 --- /dev/null +++ b/FrontEnd/public/svg/post.svg @@ -0,0 +1,3 @@ + + + diff --git a/FrontEnd/public/svg/rocket.svg b/FrontEnd/public/svg/rocket.svg new file mode 100644 index 000000000..044c4b44f --- /dev/null +++ b/FrontEnd/public/svg/rocket.svg @@ -0,0 +1,3 @@ + + + diff --git a/FrontEnd/public/svg/shop.svg b/FrontEnd/public/svg/shop.svg new file mode 100644 index 000000000..7b4f5365c --- /dev/null +++ b/FrontEnd/public/svg/shop.svg @@ -0,0 +1,3 @@ + + + diff --git a/FrontEnd/public/svg/wine.svg b/FrontEnd/public/svg/wine.svg new file mode 100644 index 000000000..bf9f7f6a3 --- /dev/null +++ b/FrontEnd/public/svg/wine.svg @@ -0,0 +1,3 @@ + + + diff --git a/FrontEnd/src/components/Contact/Contact.jsx b/FrontEnd/src/components/Contact/Contact.jsx deleted file mode 100644 index 626c0b888..000000000 --- a/FrontEnd/src/components/Contact/Contact.jsx +++ /dev/null @@ -1,198 +0,0 @@ -import { useState, useEffect, useRef } from 'react'; -import { useForm, Controller } from 'react-hook-form'; -import { Link } from 'react-router-dom'; -import axios from 'axios'; -import { Spin, Select, Space } from 'antd'; - -import { - EMAIL_PATTERN, - MESSAGE_PATTERN -} from '../../constants/constants'; - -import LinkContainer from '../../pages/CookiesPolicyPage/LinkContainer.jsx'; - -import styles from './Contact.module.css'; - -const CATEGORY_OPTIONS = [ - { value: 'Технічне питання', label: 'Технічне питання' }, - { value: 'Рекомендації', label: 'Рекомендації' }, - { value: 'Питання', label: 'Питання' }, - { value: 'Інше', label: 'Інше' }, -]; - -const Contact = () => { - const [loading, setLoading] = useState(false); - const [modalMessage, setModalMessage] = useState(''); - const [percent, setPercent] = useState(-50); - const timerRef = useRef(); - - useEffect(() => { - timerRef.current = setTimeout(() => { - setPercent((v) => { - const nextPercent = v + 5; - return nextPercent > 150 ? -50 : nextPercent; - }); - }, 100); - return () => clearTimeout(timerRef.current); - }, [percent]); - - const { - register, - handleSubmit, - reset, - control, - formState: { errors }, - } = useForm({ - mode: 'all', - defaultValues: { - 'message': 'Привіт, хочу повідомити...', - 'email': '', - }, - }); - - const onSubmit = async (value) => { - setLoading(true); - try { - const response = await axios.post(`${process.env.REACT_APP_BASE_API_URL}/api/admin/feedback/`, { - email: value.email, - message: value.message, - category: value.category, - }); - - if (response.status === 200 || response.status === 201) { - setModalMessage('Повідомлення успішно надіслано!'); - reset(); - } - } catch (error) { - setModalMessage('Щось пішло не так! Будь ласка, спробуйте ще раз!'); - } finally { - setLoading(false); - } - }; - - const handleCancel = () => { - reset(); - }; - - const closeModal = () => { - setModalMessage(''); - }; - - return ( -
-
- - decorative dot pattern -
-
-

Зворотній зв'язок

-
-
- - - {errors.email &&

{errors.email.message}

} -
-
- - - -