diff --git a/.env.example b/.env.example deleted file mode 100644 index 399f234..0000000 --- a/.env.example +++ /dev/null @@ -1,8 +0,0 @@ -# Скопируйте в .env — подойдут и имена из Next (NEXT_PUBLIC_*), и VITE_*. -VITE_API_URL=https://example.com/api/ -NEXT_PUBLIC_API=https://example.com/api/ - -# База для полей image вида projects/uuid.jpg (со слэшем на конце). -# Пример: https://storage.yandexcloud.net/dult-faib-knac-fint/ -VITE_S3_BUCKET=https://storage.yandexcloud.net/your-bucket/ -NEXT_PUBLIC_S3_BUCKET=https://storage.yandexcloud.net/your-bucket/ diff --git a/public/demo/cards/dns-city.jpg b/public/demo/cards/dns-city.jpg deleted file mode 100644 index 7b62d86..0000000 Binary files a/public/demo/cards/dns-city.jpg and /dev/null differ diff --git a/public/demo/cards/prokshino.jpg b/public/demo/cards/prokshino.jpg deleted file mode 100644 index b745e33..0000000 Binary files a/public/demo/cards/prokshino.jpg and /dev/null differ diff --git a/public/demo/cards/rivayat.jpg b/public/demo/cards/rivayat.jpg deleted file mode 100644 index 468cb96..0000000 Binary files a/public/demo/cards/rivayat.jpg and /dev/null differ diff --git a/public/img/pages/stream-demo/showreel.png b/public/img/showreel.png similarity index 100% rename from public/img/pages/stream-demo/showreel.png rename to public/img/showreel.png diff --git a/public/videos/pages/home/streaming.mp4 b/public/videos/streaming.mp4 similarity index 100% rename from public/videos/pages/home/streaming.mp4 rename to public/videos/streaming.mp4 diff --git a/src/components/Layout/Feedback.tsx b/src/components/Layout/Feedback.tsx index 88b1c61..3b92531 100644 --- a/src/components/Layout/Feedback.tsx +++ b/src/components/Layout/Feedback.tsx @@ -1,19 +1,8 @@ -import { api } from "@/lib/api"; -import { projectsTags } from "@/consts/projectsTags"; -import type { Product } from "@/types/Product"; -import { Button } from "@/ui/Button"; -import { CheckboxesGroup } from "@/ui/CheckboxesGroup"; -import { PhoneInputRu } from "@/ui/PhoneInputRu"; +import type { Product } from "@/types"; import useAddReferer from "@/hooks/useAddReferer"; -import { useRefererStore } from "@/stores/useRefererStore"; import { useModalStore } from "@/stores/useModalStore"; -import { - Controller, - FormProvider, - useForm, -} from "react-hook-form"; -import CheckIcon from "@/components/icons/CheckIcon"; import FeedbackModal from "@/components/modals/FeedbackFormModal"; +import { LeadForm } from "@/features/lead-form/LeadForm"; const DEFAULT_STREAM_DEMO_PRODUCTS = [ "Удаленная демонстрация", @@ -37,130 +26,16 @@ export function Feedback() { ); } -interface IInput { - fullname: string; - phone: string; - email: string; - products: Product[]; - referer?: string | null; -} - export function FeedbackForm() { - const { referer } = useRefererStore(); const { setModal } = useModalStore(); - const form = useForm({ - defaultValues: { - fullname: "", - email: "", - phone: "", - products: DEFAULT_STREAM_DEMO_PRODUCTS, - }, - }); - - const { register, handleSubmit, formState, control } = form; - - async function onSubmit(data: IInput) { - const { id } = await api - .post("mail", { json: { ...data, referer } }) - .json<{ id: string }>(); - setModal(); - } - return (
- {!formState.isSubmitted ? ( - -
-
-

Нам нужно

- -
- - -
- ( - - )} - /> -
-
-
- -
- - *Нажимая кнопку отправить, вы даете - {" "} - - согласие на обработку персональных данных - {" "} - и принимаете - - условия политики - -
-
- - - ) : ( -
-
-
-
- -
-
-

- Мы получили заявку -
и скоро свяжемся с вами! -

-
-
- )} + setModal()} + />
); diff --git a/src/components/Layout/LineBreak.tsx b/src/components/Layout/LineBreak.tsx index adad0db..10b4485 100644 --- a/src/components/Layout/LineBreak.tsx +++ b/src/components/Layout/LineBreak.tsx @@ -1,5 +1,3 @@ -import React from "react"; - interface BRProps { lg?: boolean; md?: boolean; diff --git a/src/components/modals/FeedbackFormModal.tsx b/src/components/modals/FeedbackFormModal.tsx index 395bb8c..b4fca6f 100644 --- a/src/components/modals/FeedbackFormModal.tsx +++ b/src/components/modals/FeedbackFormModal.tsx @@ -47,8 +47,8 @@ function FeedbackModal({ id }: { id: string }) {