diff --git a/package-lock.json b/package-lock.json index 59440c8..df7ece4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "next": "15.3.2", "react": "^19.0.0", "react-dom": "^19.0.0", + "react-hot-toast": "^2.5.2", "swiper": "^11.2.8" }, "devDependencies": { @@ -2101,7 +2102,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true, "license": "MIT" }, "node_modules/damerau-levenshtein": { @@ -3227,6 +3227,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/goober": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.16.tgz", + "integrity": "sha512-erjk19y1U33+XAMe1VTvIONHYoSqE4iS7BYUZfHaqeohLmnC0FdxEh7rQU+6MZ4OajItzjZFSRtVANrQwNq6/g==", + "license": "MIT", + "peerDependencies": { + "csstype": "^3.0.10" + } + }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -4759,6 +4768,23 @@ "react": "^19.1.0" } }, + "node_modules/react-hot-toast": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.5.2.tgz", + "integrity": "sha512-Tun3BbCxzmXXM7C+NI4qiv6lT0uwGh4oAfeJyNOjYUejTsm35mK9iCaYLGv8cBz9L5YxZLx/2ii7zsIwPtPUdw==", + "license": "MIT", + "dependencies": { + "csstype": "^3.1.3", + "goober": "^2.1.16" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": ">=16", + "react-dom": ">=16" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", diff --git a/package.json b/package.json index b17420c..b7dc14a 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "next": "15.3.2", "react": "^19.0.0", "react-dom": "^19.0.0", + "react-hot-toast": "^2.5.2", "swiper": "^11.2.8" }, "devDependencies": { diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 97409e4..ed599af 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata } from 'next'; import { Open_Sans } from 'next/font/google'; import '@core/styles/reset.scss'; import '@core/styles/globals.scss'; +import { Toaster } from 'react-hot-toast'; const openSans = Open_Sans({ subsets: ['cyrillic'], @@ -32,7 +33,10 @@ export default function RootLayout({ }: Readonly<{ children: React.ReactNode }>) { return ( - {children} + + {children} + + ); } diff --git a/src/entities/home/ConsultationOrder/index.ts b/src/entities/home/ConsultationOrder/index.ts new file mode 100644 index 0000000..dac7ffd --- /dev/null +++ b/src/entities/home/ConsultationOrder/index.ts @@ -0,0 +1 @@ +export { default as ConsultationOrder } from './ui'; diff --git a/src/entities/home/ConsultationOrder/ui.tsx b/src/entities/home/ConsultationOrder/ui.tsx new file mode 100644 index 0000000..5a410bb --- /dev/null +++ b/src/entities/home/ConsultationOrder/ui.tsx @@ -0,0 +1,13 @@ +'use client'; +import { Button } from '@shared/ui'; +import toast from 'react-hot-toast'; + +export default function ConsultationOrder() { + const notify = () => toast.success('Заявка на консультацию принята'); + + return ( + + ); +} diff --git a/src/views/home/ui/contacts/contacts.module.scss b/src/views/home/ui/contacts/contacts.module.scss index a1e480c..e25a581 100644 --- a/src/views/home/ui/contacts/contacts.module.scss +++ b/src/views/home/ui/contacts/contacts.module.scss @@ -96,127 +96,6 @@ } } -.Form { - position: relative; - background: #292E3D; - display: flex; - flex-direction: column; - gap: rem(40px); - overflow: hidden; - padding: rem(60px) rem(50px); - border-radius: rem(28px); - margin-bottom: rem(80px); - - @include iftablet { - flex-direction: row; - gap: unset; - padding: rem(60px) rem(50px); - border-radius: rem(28px); - margin-bottom: rem(120px); - } - - @include iflaptop { - padding: rem(60px) rem(50px); - border-radius: rem(28px); - margin-bottom: rem(100px); - } - - @include ifdesktop { - padding: rem(60px) rem(50px); - border-radius: rem(28px); - margin-bottom: rem(160px); - } - - &:after { - content: ''; - display: block; - width: 100%; - height: 100%; - position: absolute; - z-index: 1; - left: 0; - top: 0; - background-color: rgba(#163055, .6); - transition: 250ms background-color; - } - - .Background { - position: absolute; - object-fit: cover; - z-index: 1; - } - - .Offer { - flex: 2; - display: flex; - flex-direction: column; - - .Title { - position: relative; - z-index: 2; - font-family: $font-open-sans; - font-weight: $font-semi-bold; - font-size: rem(26px); - line-height: 100%; - color: $color-white; - margin-bottom: rem(16px); - - @include iftablet { - font-size: rem(28px); - margin-bottom: rem(60px); - } - - @include iflaptop { - font-size: rem(36px); - margin-bottom: rem(80px); - } - - @include ifdesktop { - font-size: rem(48px); - margin-bottom: rem(80px); - } - } - - .SubTitle { - position: relative; - z-index: 2; - font-family: $font-open-sans; - font-weight: $font-light; - font-size: rem(16px); - line-height: 100%; - color: $color-white; - - @include iftablet { - font-size: rem(18px); - } - - @include iflaptop { - font-size: rem(20px); - } - - @include ifdesktop { - font-size: rem(32px); - max-width: rem(720px); - } - } - } - - .Inputs { - position: relative; - z-index: 2; - flex: 1; - display: flex; - flex-direction: column; - justify-content: center; - align-self: center; - gap: rem(20px); - - @include iftablet { - align-self: unset; - } - } -} - .Map { position: relative; diff --git a/src/views/home/ui/contacts/contacts.tsx b/src/views/home/ui/contacts/contacts.tsx index f55aad6..3bbc273 100644 --- a/src/views/home/ui/contacts/contacts.tsx +++ b/src/views/home/ui/contacts/contacts.tsx @@ -1,5 +1,6 @@ import s from './contacts.module.scss'; -import { Button, Input, Mark } from '@shared/ui'; +import { Mark } from '@shared/ui'; +import { ContactsForm } from '@/widgets'; import Image from 'next/image'; import bogatyrLogo from '@public/images/logo-bogatyr.png'; @@ -7,7 +8,6 @@ import sochiparkLogo from '@public/images/logo-sochipark.png'; import chateauLogo from '@public/images/logo-chateau-de-talu.png'; import gazpromLogo from '@public/images/logo-gazprom.png'; import kraspolLogo from '@public/images/logo-kraspol.png'; -import bgForm from '@public/images/bg-form.jpg'; import ledOn from '@public/svg/led-on.svg'; import phoneCall from '@public/svg/phone-call.svg'; import map from '@public/svg/map.svg'; @@ -28,31 +28,7 @@ export default function Contacts() { ))} -
- {''} -
-

Остались вопросы?

-

- Наш эксперт свяжется с вами для уточнения подробностей и - определения точной стоимости работ -

-
-
- - - -
-
+