diff --git a/package-lock.json b/package-lock.json index e168c98..50858fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "marine-travel", "version": "0.1.0", "dependencies": { + "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-navigation-menu": "^1.2.14", "@radix-ui/react-popover": "^1.1.15", "@radix-ui/react-select": "^2.2.6", @@ -2865,6 +2866,42 @@ } } }, + "node_modules/@radix-ui/react-dialog": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.15.tgz", + "integrity": "sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-dismissable-layer": "1.1.11", + "@radix-ui/react-focus-guards": "1.1.3", + "@radix-ui/react-focus-scope": "1.1.7", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-portal": "1.1.9", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-slot": "1.2.3", + "@radix-ui/react-use-controllable-state": "1.2.2", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-direction": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.1.tgz", diff --git a/package.json b/package.json index c6544f8..9e32114 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "eslint" }, "dependencies": { + "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-navigation-menu": "^1.2.14", "@radix-ui/react-popover": "^1.1.15", "@radix-ui/react-select": "^2.2.6", diff --git a/public/images/featured-yacht/featured1.png b/public/images/featured-yacht/featured1.png new file mode 100644 index 0000000..05526a0 Binary files /dev/null and b/public/images/featured-yacht/featured1.png differ diff --git a/public/images/featured-yacht/featured10.png b/public/images/featured-yacht/featured10.png new file mode 100644 index 0000000..d488f0e Binary files /dev/null and b/public/images/featured-yacht/featured10.png differ diff --git a/public/images/featured-yacht/featured2.png b/public/images/featured-yacht/featured2.png new file mode 100644 index 0000000..c2bff86 Binary files /dev/null and b/public/images/featured-yacht/featured2.png differ diff --git a/public/images/featured-yacht/featured3.png b/public/images/featured-yacht/featured3.png new file mode 100644 index 0000000..982c437 Binary files /dev/null and b/public/images/featured-yacht/featured3.png differ diff --git a/public/images/featured-yacht/featured4.png b/public/images/featured-yacht/featured4.png new file mode 100644 index 0000000..04a0e68 Binary files /dev/null and b/public/images/featured-yacht/featured4.png differ diff --git a/public/images/featured-yacht/featured5.png b/public/images/featured-yacht/featured5.png new file mode 100644 index 0000000..0782781 Binary files /dev/null and b/public/images/featured-yacht/featured5.png differ diff --git a/public/images/featured-yacht/featured6.png b/public/images/featured-yacht/featured6.png new file mode 100644 index 0000000..d488f0e Binary files /dev/null and b/public/images/featured-yacht/featured6.png differ diff --git a/public/images/featured-yacht/featured7.png b/public/images/featured-yacht/featured7.png new file mode 100644 index 0000000..982c437 Binary files /dev/null and b/public/images/featured-yacht/featured7.png differ diff --git a/public/images/featured-yacht/featured8.png b/public/images/featured-yacht/featured8.png new file mode 100644 index 0000000..04a0e68 Binary files /dev/null and b/public/images/featured-yacht/featured8.png differ diff --git a/public/images/featured-yacht/featured9.png b/public/images/featured-yacht/featured9.png new file mode 100644 index 0000000..0782781 Binary files /dev/null and b/public/images/featured-yacht/featured9.png differ diff --git a/src/app/components/FeaturedYacht.tsx b/src/app/components/FeaturedYacht.tsx index b56dbfa..e1f6035 100644 --- a/src/app/components/FeaturedYacht.tsx +++ b/src/app/components/FeaturedYacht.tsx @@ -1,3 +1,5 @@ +"use client"; + import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { DatePicker } from "@/components/ui/date-picker"; @@ -8,8 +10,16 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; +import { + Carousel, + CarouselContent, + CarouselItem, + CarouselNext, + CarouselPrevious, +} from "@/components/ui/carousel"; import Image from "next/image"; import Icon from "@/components/ui/icon"; +import { useState } from "react"; const yacht = { name: "Яхта", @@ -17,19 +27,30 @@ const yacht = { price: "от 18 000 ₽", perTime: "/ час", feet: "7 Футов", - mainImage: "/images/yacht.jpg", + mainImage: "/images/featured-yacht/featured1.png", thumbnails: [ - "/images/yacht.jpg", - "/images/another-yacht.jpg", - "/images/yacht.jpg", - "/images/another-yacht.jpg", - "/images/yacht.jpg", + "/images/featured-yacht/featured1.png", + "/images/featured-yacht/featured2.png", + "/images/featured-yacht/featured3.png", + "/images/featured-yacht/featured4.png", + "/images/featured-yacht/featured5.png", + "/images/featured-yacht/featured6.png", + "/images/featured-yacht/featured7.png", + "/images/featured-yacht/featured8.png", + "/images/featured-yacht/featured9.png", + "/images/featured-yacht/featured10.png", ], isPromoted: true, totalPrice: "0 ₽", }; export default function FeaturedYacht() { + const [selectedImage, setSelectedImage] = useState(yacht.mainImage); + + const handleThumbnailClick = (imageSrc: string) => { + setSelectedImage(imageSrc); + }; + return (