diff --git a/client/public/images/logos.svg b/client/public/images/logos.svg index a995041..9775abc 100644 --- a/client/public/images/logos.svg +++ b/client/public/images/logos.svg @@ -1,264 +1,264 @@ - - - - + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + diff --git a/client/public/images/logos_en.svg b/client/public/images/logos_en.svg new file mode 100644 index 0000000..b243bda --- /dev/null +++ b/client/public/images/logos_en.svg @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/public/images/shapes/5.svg b/client/public/images/shapes/5.svg new file mode 100644 index 0000000..93e8f30 --- /dev/null +++ b/client/public/images/shapes/5.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/src/App.tsx b/client/src/App.tsx index 73c76a9..ecf9cd6 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -23,8 +23,8 @@ import StreamCard2 from "./components/StreamCard2"; function App() { const [fullname, setFullname] = useState(""); const [email, setEmail] = useState(""); - const [company, setCompany] = useState(""); const [phone, setPhone] = useState(""); + const [request, setRequest] = useState(""); const [isShowComplexCards, setIsShowComplexCards] = useState(false); const [setModalComponent] = useModalStore((state) => [state.setComponent]); @@ -37,21 +37,27 @@ function App() { async function handleSubmitSendMail(e: FormEvent) { e.preventDefault(); - await api.post("mail", { - json: { - fullname, - email, - company, - phone, - }, - }); + const result: any = await api + .post("mail", { + json: { + fullname, + email, + phone, + request, + }, + }) + .json(); - setFullname(""); - setEmail(""); - setCompany(""); - setPhone(""); + if (result.ok) { + setFullname(""); + setEmail(""); + setPhone(""); + setRequest(""); - setModalComponent(); + setModalComponent(); + } else { + alert("Error sending, please try again later."); + } } useEffect(() => { @@ -661,12 +667,15 @@ function App() {
- <Trans i18nKey="showAllAdvantagesHeading"> - Покажите все преимущества вашего жилого комплекса клиенту - <br /> - из любой точки мира + {/* <Trans i18nKey="showAllAdvantagesHeading"> */} + Graff.estate stream + <br />—{" "} + <Trans i18nKey="remoteDemoHeading"> + удаленная демонстрация жилого комплекса </Trans> + {/* </Trans> */} +

@@ -681,9 +690,13 @@ function App() {

+ +
+ +
-
+

Демонстрация технологии @@ -729,9 +742,7 @@ function App() {

- {/*
- -
*/} +
{/*
@@ -971,248 +982,230 @@ function App() {
- {i18n.language === "ru" && ( -
-
-
- Нам доверяют - -
+
+
+
+ + <Trans i18nKey="weAreTrustedHeading">Нам доверяют</Trans> + +
- )} +
-
+
-
-
-
-

- Свяжитесь с нами -

-

- +

+
+
+ + <Trans i18nKey={"contactUsHeading"}>Свяжитесь с нами</Trans> + + +

+ Хотите увеличить конверсию?
Давайте обсудим детали!

+ +
+ +
+
-
+
- +

+ Имя* +

setFullname(e.target.value)} + className="bg-[#212431] xl:p-4 lg:p-3 p-2 border border-transparent focus:border-[#BC75FF] outline-none transition-colors rounded w-full" />
-
- - setCompany(e.target.value)} - /> -
-
-
- +

Email*

setEmail(e.target.value)} + className="bg-[#212431] xl:p-4 lg:p-3 p-2 border border-transparent focus:border-[#BC75FF] outline-none transition-colors rounded w-full" />
+
- - {i18n.language === "ru" ? ( - setPhone(e.target.value)} - /> - ) : ( - setPhone(e.target.value)} - /> - )} +

+ Телефон +

+ setPhone(e.target.value)} + className="bg-[#212431] xl:p-4 lg:p-3 p-2 border border-transparent focus:border-[#BC75FF] outline-none transition-colors rounded w-full" + /> +
+ +
+

+ + Ваш запрос + +

+
-
-
-
-
- +
+ +
+ + -
- - - -
-
- +
- +
+ + -
-
-
-
-

- Email -

-

- info@graff.tech -

-
-
-

- Телефон -

-

- 8 800 770 00 - 76 -

-
+
+ +
+ +
+
+
+

+ Email +

+

+ info@graff.tech +

-
-
-

- Сайт -

-

- - graff.tech - -

-
-
-

- Социальные сети -

-

- - YouTube - - - VK - -

-
+
+

+ Телефон +

+

+ 8 800 770 00 76 +

-
-
-
- - - - Политика конфиденциальности - - +
+
+

+ Сайт +

+

+ + graff.tech + +

+
+
+

+ Социальные сети +

+

+ + YouTube + + + VK + +

-

- © 2023 GRAFF interactive.{" "} - Все права защищены. -

+ +
+ +
+ +

+ © 2023 GRAFF interactive.{" "} + Все права защищены. +

+
diff --git a/client/src/components/FeedbackForm.tsx b/client/src/components/FeedbackForm.tsx index b30efc7..00750d7 100644 --- a/client/src/components/FeedbackForm.tsx +++ b/client/src/components/FeedbackForm.tsx @@ -5,6 +5,7 @@ import useModalStore from "../store/modal"; import FeedbackFormSuccess from "./FeedbackFormSuccess"; import { Trans } from "react-i18next"; import i18n from "../i18n"; +import Title from "./Title"; function FeedbackForm() { const [modalComponent, setModalComponent] = useModalStore((state) => [ @@ -13,172 +14,143 @@ function FeedbackForm() { ]); const [fullname, setFullname] = useState(""); const [email, setEmail] = useState(""); - const [company, setCompany] = useState(""); const [phone, setPhone] = useState(""); + const [request, setRequest] = useState(""); async function handleSubmitSendMail(e: FormEvent) { e.preventDefault(); - await api.post("mail", { - json: { - fullname, - email, - company, - phone, - }, - }); + const result: any = await api + .post("mail", { + json: { + fullname, + email, + phone, + request, + }, + }) + .json(); - setFullname(""); - setEmail(""); - setCompany(""); - setPhone(""); + if (result.ok) { + setFullname(""); + setEmail(""); + setPhone(""); + setRequest(""); - setModalComponent(); + setModalComponent(); + } else { + alert("Error sending, please try again later."); + } } return (
-
-

- Свяжитесь с нами -

+
+ + <Trans i18nKey={"contactUsHeading"}>Свяжитесь с нами</Trans> +
-
+
- +

+ Имя* +

setFullname(e.target.value)} + className="bg-[#212431] xl:p-4 lg:p-3 p-2 border border-transparent focus:border-[#BC75FF] outline-none transition-colors rounded w-full" />
-
- - setCompany(e.target.value)} - /> -
-
-
- +

Email*

setEmail(e.target.value)} + className="bg-[#212431] xl:p-4 lg:p-3 p-2 border border-transparent focus:border-[#BC75FF] outline-none transition-colors rounded w-full" />
+
- - {i18n.language === "ru" ? ( - setPhone(e.target.value)} - /> - ) : ( - setPhone(e.target.value)} - /> - )} +

+ Телефон +

+ setPhone(e.target.value)} + className="bg-[#212431] xl:p-4 lg:p-3 p-2 border border-transparent focus:border-[#BC75FF] outline-none transition-colors rounded w-full" + /> +
+ +
+

+ Ваш запрос +

+
-
-
-
-
- +
+ +
+ + -
- - - -
-
- +
- +
+ +
diff --git a/client/src/components/FeedbackFormSuccess.tsx b/client/src/components/FeedbackFormSuccess.tsx index 3dfb5ac..9c0650f 100644 --- a/client/src/components/FeedbackFormSuccess.tsx +++ b/client/src/components/FeedbackFormSuccess.tsx @@ -18,7 +18,7 @@ function FeedbackForm() { return (
-
+

@@ -50,7 +50,7 @@ function FeedbackForm() { diff --git a/client/src/components/Map.tsx b/client/src/components/Map.tsx index 2091d1f..40b96d3 100644 --- a/client/src/components/Map.tsx +++ b/client/src/components/Map.tsx @@ -14,7 +14,6 @@ function Map() { fill="none" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" - className="lg:w-[175%] w-[150%]" > diff --git a/client/src/components/StreamCard2.tsx b/client/src/components/StreamCard2.tsx index 7af5752..1c1a62f 100644 --- a/client/src/components/StreamCard2.tsx +++ b/client/src/components/StreamCard2.tsx @@ -11,7 +11,7 @@ interface StreamCardProps { function StreamCard2({ image, icon, name, location, build }: StreamCardProps) { return (

Давайте обсудим детали!", - contactUsLabelName: "Имя Фамилия*", - contactUsLabelCompany: "Компания", + contactUsLabelName: "Имя*", contactUsLabelPhone: "Телефон", + contactUsLabelRequest: "Ваш запрос", contactUsCheckboxText1: "Я согласен с", contactUsCheckboxText2: "политикой конфиденциальности", contactUsBtn: "Отправить заявку", @@ -229,6 +231,7 @@ i18n "High-quality graphics and full immersion of the customer into the apartment selection process.", showAllAdvantagesText2: "No matter where you or your terminal is located. Internet connection is the only thing you need.", + remoteDemoHeading: "remote demo of a residential complex", availableDemonstrationsHeading: "Technology demonstration", residentialСomplex1: "Re:volution towers", residentialСomplex2: "Aivazovsky", @@ -249,12 +252,13 @@ i18n availableDemonstrationsCardBtn: "Run demo", implementedProjectsHeading: "Implemented projects", implementedProjectsBtn: "Show more", + weAreTrustedHeading: "We are trusted", contactUsHeading: "Contact us", contactUsDesc: "Need to increase conversion?
You are welcome to discuss the details!", contactUsLabelName: "Name*", - contactUsLabelCompany: "Company", contactUsLabelPhone: "Phone", + contactUsLabelRequest: "Your request", contactUsCheckboxText1: "I agree with the", contactUsCheckboxText2: "privacy policy", contactUsBtn: "Send request", diff --git a/server/app.js b/server/app.js index ba2a74c..c579e70 100644 --- a/server/app.js +++ b/server/app.js @@ -6,7 +6,7 @@ import nodemailer from "nodemailer"; import Mail from "./models/Mail.js"; const app = express(); -const port = 3003; +const port = 3000; app.use(cors()); app.use(express.json()); @@ -32,7 +32,7 @@ app.get("/regions", async (req, res) => { console.log(regions); - res.send(regions); + res.json(regions); }); app.get("/region/:id", async (req, res) => { @@ -62,52 +62,61 @@ app.get("/region/:id", async (req, res) => { const { objSquareLivingAmt, objCnt } = result3.data.total; const avgAreaInComplex = Math.round(objSquareLivingAmt / objCnt); - res.send({ avgApartmentArea, priceAvg, avgAreaInComplex }); + res.json({ avgApartmentArea, priceAvg, avgAreaInComplex }); } catch (error) { - res.send({ error: 1 }); + res.json({ error: 1 }); } }); app.post("/mail", async (req, res) => { - const { fullname, email, company, phone } = req.body; - await Mail.create(req.body); + try { + const { fullname, email, phone, request } = req.body; + await Mail.create(req.body); - // create reusable transporter object using the default SMTP transport - let transporter = nodemailer.createTransport({ - host: "mail.netangels.ru", - port: 587, - secure: false, // true for 465, false for other ports - auth: { - user: "test@graff.tech", // generated ethereal user - pass: "ZmL0pKiDFWUyCDMq", // generated ethereal password - }, - }); + // create reusable transporter object using the default SMTP transport + let transporter = nodemailer.createTransport({ + host: "mail.netangels.ru", + port: 587, + secure: false, // true for 465, false for other ports + auth: { + user: "test@graff.tech", // generated ethereal user + pass: "ZmL0pKiDFWUyCDMq", // generated ethereal password + }, + }); - // send mail with defined transport object - let info = await transporter.sendMail({ - from: `${email}`, // sender address - to: "info@graff.tech", // list of receivers - subject: 'Заявка с сайта estate.graff.tech', // Subject line - text: ` + // send mail with defined transport object + let info = await transporter.sendMail({ + from: email, // sender address + to: "info@graff.tech", // list of receivers + subject: "Заявка с сайта estate.graff.tech", // Subject line + text: ` Имя Фамилия: ${fullname} + Email: ${email} Телефон: ${phone} - Компания: ${company} + Текст запроса: ${request} `, // plain text body - html: `
-

Имя Фамилия: ${fullname}

+ html: `
+

Имя: ${fullname}

+

Email: ${email}

Телефон: ${phone}

-

Компания: ${company}

+

Текст запроса: ${request}

`, // html body - }); + }); - console.log(info); + console.log(info); - res.send({ ok: 1 }); + console.log(req.body); + + res.json({ ok: 1 }); + } catch (error) { + console.log(error); + res.json({ error: 1 }); + } }); app.listen(port, async () => { await mongoose.connect( - "mongodb://192.168.1.159:27017/", + "mongodb://root:p62Z!ZatgY25@194.26.138.94:27017/", { dbName: "estate" }, console.log("DB connection...") ); diff --git a/server/models/Mail.js b/server/models/Mail.js index fcc43cb..ec393c2 100644 --- a/server/models/Mail.js +++ b/server/models/Mail.js @@ -5,15 +5,15 @@ const mailSchema = new Schema( fullname: { type: String, required: true, - }, // String is shorthand for {type: String} + }, email: { type: String, required: true, }, - company: { + phone: { type: String, }, - phone: { + request: { type: String, }, },