nestiq-component-library 1.0.25 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/images/Icon_rightArrow.bced4a705c07148d.svg +3 -0
- package/dist/assets/images/LayersIcon.34c085c352a2c9c8.svg +5 -0
- package/dist/assets/images/blackarrow-Right.e585ae62dd55abae.svg +3 -0
- package/dist/assets/images/blckarrow-Left.e2134741aa368d30.svg +3 -0
- package/dist/assets/images/chevron-left.04f0a7f16b745c1a.svg +3 -0
- package/dist/assets/images/default-property.9987f19670be82b6.jpg +0 -0
- package/dist/assets/images/envelope-fill.6669c9d64183941c.svg +3 -0
- package/dist/assets/images/facebook.ce73eacbfffe8a27.svg +3 -0
- package/dist/assets/images/icon_close_2.e41bb9a4db48e048.png +0 -0
- package/dist/assets/images/icon_gallery.269b721daf2ca907.svg +4 -0
- package/dist/assets/images/icon_map.2318ec664c3e615e.svg +10 -0
- package/dist/assets/images/icon_share_1.b9ec05630dc1087e.svg +3 -0
- package/dist/assets/images/layer_icon.9b56c187199c44b5.svg +5 -0
- package/dist/assets/images/linkedin.7539333145b03678.svg +3 -0
- package/dist/assets/images/locationIcon.0af399c78e0cdc20.svg +4 -0
- package/dist/assets/images/locationIconBlack.eb8e9e9226b43573.svg +4 -0
- package/dist/assets/images/twitter-x.48a4ac3f560f0a62.svg +3 -0
- package/dist/assets/images/whatsapp.28e6b0b24adc9289.svg +3 -0
- package/dist/components/ImageListPopup/ImageListPopup.d.ts +4 -11
- package/dist/components/PropertyDetailsHeader/PropertyDetailsHeader.d.ts +1 -1
- package/dist/components/PropertyImageList/PropertyImageList.d.ts +4 -9
- package/dist/components/SharePopup/PopUp.d.ts +7 -0
- package/dist/index.es.js +105 -73
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +104 -72
- package/dist/index.js.map +1 -1
- package/nestiq-component-library-1.0.26.tgz +0 -0
- package/package.json +3 -7
- package/rollup.config.mjs +2 -7
- package/src/assets/images/Images/Icon_rightArrow.svg +3 -0
- package/src/assets/images/Images/LayersIcon.svg +5 -0
- package/src/assets/images/Images/Logo-Nestiq_black.svg +7 -0
- package/src/assets/images/Images/arrow-right-short.svg +3 -0
- package/src/assets/images/Images/arrow-right.svg +10 -0
- package/src/assets/images/Images/blackarrow-Right.svg +3 -0
- package/src/assets/images/Images/blckarrow-Left.svg +3 -0
- package/src/assets/images/Images/chevron-left.svg +3 -0
- package/src/assets/images/Images/default-property.jpg +0 -0
- package/src/assets/images/Images/dropdownIcon.svg +16 -0
- package/src/assets/images/Images/envelope-fill.svg +3 -0
- package/src/assets/images/Images/facebook.svg +3 -0
- package/src/assets/images/Images/facebook_icon.svg +3 -0
- package/src/assets/images/Images/google_icon.svg +10 -0
- package/src/assets/images/Images/heart.svg +3 -0
- package/src/assets/images/Images/heartIcon.svg +3 -0
- package/src/assets/images/Images/house.jpg +0 -0
- package/src/assets/images/Images/icon-close-white.webp +0 -0
- package/src/assets/images/Images/icon_checkmark.svg +10 -0
- package/src/assets/images/Images/icon_close 2.png +0 -0
- package/src/assets/images/Images/icon_gallery.svg +4 -0
- package/src/assets/images/Images/icon_home.svg +3 -0
- package/src/assets/images/Images/icon_map.svg +10 -0
- package/src/assets/images/Images/icon_share 1.svg +3 -0
- package/src/assets/images/Images/icon_user.png +0 -0
- package/src/assets/images/Images/layer_icon.svg +5 -0
- package/src/assets/images/Images/left arrow.svg +16 -0
- package/src/assets/images/Images/left-arrow.svg +4 -0
- package/src/assets/images/Images/linkedin.svg +3 -0
- package/src/assets/images/Images/locationIcon.svg +4 -0
- package/src/assets/images/Images/locationIconBlack.svg +4 -0
- package/src/assets/images/Images/mail-icon.png +0 -0
- package/src/assets/images/Images/no-image-icon.png +0 -0
- package/src/assets/images/Images/right arrow.svg +16 -0
- package/src/assets/images/Images/right-arrow.svg +4 -0
- package/src/assets/images/Images/twitter-x.svg +3 -0
- package/src/assets/images/Images/warning.svg +11 -0
- package/src/assets/images/Images/whatsapp.svg +3 -0
- package/src/assets/images/Images/x.svg +3 -0
- package/src/assets/images/envelope-fill.svg +3 -0
- package/src/assets/images/facebook.svg +3 -0
- package/src/assets/images/linkedin.svg +3 -0
- package/src/assets/images/twitter-x.svg +3 -0
- package/src/assets/images/whatsapp.svg +3 -0
- package/src/components/ImageListPopup/ImageListPopup.tsx +15 -86
- package/src/components/PropertyDetailsHeader/PropertyDetailsHeader.tsx +15 -13
- package/src/components/PropertyImageList/PropertyImageList.tsx +14 -43
- package/src/components/SharePopup/PopUp.css +359 -0
- package/src/components/SharePopup/PopUp.tsx +130 -0
- package/tsconfig.json +2 -0
- package/nestiq-component-library-1.0.22.tgz +0 -0
|
@@ -1,51 +1,20 @@
|
|
|
1
1
|
import "./ImageListPopup.css";
|
|
2
|
-
import React, {
|
|
3
|
-
// import icon_checkmark from "../../../assets/Images/icon_checkmark.svg";
|
|
2
|
+
import React, { useRef, useState } from "react";
|
|
4
3
|
import blcIconArrowRight from "../../assets/Images/blackarrow-Right.svg";
|
|
5
4
|
import blcIconArrowLeft from "../../assets/Images/blckarrow-Left.svg";
|
|
6
5
|
import iconClose from "../../assets/images/icon_close_2.png";
|
|
7
6
|
|
|
8
7
|
interface PopupProps {
|
|
9
|
-
|
|
10
|
-
city: string;
|
|
11
|
-
constructedArea: string;
|
|
12
|
-
rooms: string;
|
|
13
|
-
propertyArea: string;
|
|
14
|
-
askingPrice: string;
|
|
15
|
-
};
|
|
16
|
-
handleArrowClickInMainImage: any;
|
|
17
|
-
pictureUrls: any[];
|
|
18
|
-
currentImageIndex: number;
|
|
19
|
-
imageListRef: any;
|
|
8
|
+
pictureUrls: { title: string; url: string }[];
|
|
20
9
|
}
|
|
21
10
|
|
|
22
11
|
export default function ImageListPopup(props: PopupProps) {
|
|
23
12
|
const [showPopUp, setShowPopUp] = useState(true);
|
|
24
|
-
// const { id } = useParams();
|
|
25
|
-
const [mainImage, setMainImage] = useState(null);
|
|
26
13
|
const [currentImageIndex, setCurrentImageIndex] = useState(0);
|
|
27
|
-
|
|
28
|
-
const imageListRef = useRef(null);
|
|
29
|
-
|
|
30
|
-
// const baseUrl = "https://api-dev.nestiq.de";
|
|
31
|
-
// const pictureUrls = props.property.pictures.map(
|
|
32
|
-
// (picture) => `${baseUrl}${picture.contentUrl}`
|
|
33
|
-
// );
|
|
34
|
-
const imagePopupData = props.pictureUrls.map((pic) => {
|
|
35
|
-
return {
|
|
36
|
-
src: pic,
|
|
37
|
-
title: "Not Specified",
|
|
38
|
-
};
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
if (props.pictureUrls.length > 0) {
|
|
43
|
-
setMainImage(props.pictureUrls[0]);
|
|
44
|
-
}
|
|
45
|
-
}, [props.pictureUrls]);
|
|
14
|
+
const imageListRef = useRef<HTMLDivElement | null>(null);
|
|
46
15
|
|
|
47
16
|
const handleArrowClickInMainImage = (direction: any) => {
|
|
48
|
-
if (
|
|
17
|
+
if (props.pictureUrls.length === 0) return;
|
|
49
18
|
|
|
50
19
|
let newIndex = currentImageIndex;
|
|
51
20
|
if (direction === "left") {
|
|
@@ -57,9 +26,8 @@ export default function ImageListPopup(props: PopupProps) {
|
|
|
57
26
|
}
|
|
58
27
|
|
|
59
28
|
setCurrentImageIndex(newIndex);
|
|
60
|
-
setMainImage(props.pictureUrls[newIndex]);
|
|
61
29
|
|
|
62
|
-
|
|
30
|
+
imageListRef.current!.scrollTo({
|
|
63
31
|
left: newIndex * 150,
|
|
64
32
|
behavior: "smooth",
|
|
65
33
|
});
|
|
@@ -74,11 +42,14 @@ export default function ImageListPopup(props: PopupProps) {
|
|
|
74
42
|
{showPopUp && (
|
|
75
43
|
<div className="popup-overlay">
|
|
76
44
|
<div className=" d-flex flex-column col-6 ">
|
|
45
|
+
<span className="txt-white">
|
|
46
|
+
{props.pictureUrls[currentImageIndex].title}
|
|
47
|
+
</span>
|
|
77
48
|
<div className="d-flex align-self-end me-0 ms-5">
|
|
78
49
|
<img
|
|
79
50
|
src={iconClose}
|
|
80
51
|
alt="close"
|
|
81
|
-
className="closeIcon
|
|
52
|
+
className="closeIcon"
|
|
82
53
|
onClick={handleClose}
|
|
83
54
|
/>
|
|
84
55
|
</div>
|
|
@@ -101,7 +72,7 @@ export default function ImageListPopup(props: PopupProps) {
|
|
|
101
72
|
<div
|
|
102
73
|
className=" rounded-5 mainImage "
|
|
103
74
|
style={{
|
|
104
|
-
backgroundImage: `url(${props.pictureUrls[currentImageIndex]})`,
|
|
75
|
+
backgroundImage: `url(${props.pictureUrls[currentImageIndex].url})`,
|
|
105
76
|
height: "350px",
|
|
106
77
|
width: "600px",
|
|
107
78
|
backgroundSize: "cover",
|
|
@@ -124,54 +95,25 @@ export default function ImageListPopup(props: PopupProps) {
|
|
|
124
95
|
</div>
|
|
125
96
|
</div>
|
|
126
97
|
</div>
|
|
127
|
-
{/* <div className="d-flex flex-column">
|
|
128
|
-
<div className=" d-flex flex-row align-self-center ">
|
|
129
|
-
<img
|
|
130
|
-
src={LeftArrow}
|
|
131
|
-
alt="close"
|
|
132
|
-
className="w-100 h-100 align-self-center me-5 "
|
|
133
|
-
/>
|
|
134
|
-
<img src={house} alt="close" className="w-100 h-100 " />
|
|
135
|
-
<img
|
|
136
|
-
src={RightArrow}
|
|
137
|
-
alt="close"
|
|
138
|
-
className="w-100 h-100 align-self-center ms-5 "
|
|
139
|
-
/>
|
|
140
|
-
</div>
|
|
141
|
-
</div> */}
|
|
142
98
|
<div className="d-flex flex-row">
|
|
143
99
|
{/* Arrows on the main image */}
|
|
144
100
|
</div>
|
|
145
101
|
<div className="d-flex flex-row gap-4 w-100 secondList ">
|
|
146
102
|
<div className="col-lg-12 d-flex flex-row p-1 align-self-center mt-5">
|
|
147
103
|
<div className="col-12 position-relative d-flex justify-content-center">
|
|
148
|
-
{/* <div
|
|
149
|
-
className="col-1 h-100 d-flex position-absolute start-0"
|
|
150
|
-
onClick={() => handleArrowClickInMainImage("left")}
|
|
151
|
-
role="button"
|
|
152
|
-
>
|
|
153
|
-
<div className="col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3">
|
|
154
|
-
<img
|
|
155
|
-
src={iconArrowLeft}
|
|
156
|
-
className="arroIconColour"
|
|
157
|
-
alt="Left Arrow"
|
|
158
|
-
/>
|
|
159
|
-
</div>
|
|
160
|
-
</div> */}
|
|
161
104
|
<div
|
|
162
105
|
className="col-lg-10 rounded-3 h-100 w-100 d-flex flex-row gap-2 overflow-auto "
|
|
163
|
-
ref={
|
|
106
|
+
ref={imageListRef}
|
|
164
107
|
>
|
|
165
|
-
{props.
|
|
108
|
+
{props.pictureUrls.length > 0 && (
|
|
166
109
|
<div className="col-lg-5 h-100 w-25 d-flex gap-4 flex-row rounded-3">
|
|
167
|
-
{props.pictureUrls.map((
|
|
110
|
+
{props.pictureUrls.map((picture, index) => (
|
|
168
111
|
<div
|
|
169
112
|
key={index}
|
|
170
113
|
className="col-lg-12 h-100 d-flex"
|
|
171
114
|
onClick={() => {
|
|
172
|
-
setMainImage(imageUrl);
|
|
173
115
|
setCurrentImageIndex(index);
|
|
174
|
-
|
|
116
|
+
imageListRef.current!.scrollTo({
|
|
175
117
|
left: index * 150,
|
|
176
118
|
behavior: "smooth",
|
|
177
119
|
});
|
|
@@ -179,7 +121,7 @@ export default function ImageListPopup(props: PopupProps) {
|
|
|
179
121
|
role="button"
|
|
180
122
|
>
|
|
181
123
|
<img
|
|
182
|
-
src={
|
|
124
|
+
src={picture.url}
|
|
183
125
|
alt={`Image ${index + 1}`}
|
|
184
126
|
className="col-12 h-100 rounded-3 object-fit-cover"
|
|
185
127
|
/>
|
|
@@ -188,19 +130,6 @@ export default function ImageListPopup(props: PopupProps) {
|
|
|
188
130
|
</div>
|
|
189
131
|
)}
|
|
190
132
|
</div>
|
|
191
|
-
{/* <div
|
|
192
|
-
className="col-1 h-100 d-flex position-absolute end-0 top-0"
|
|
193
|
-
onClick={() => handleArrowClickInMainImage("right")}
|
|
194
|
-
role="button"
|
|
195
|
-
>
|
|
196
|
-
<div className="col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3 ms-1">
|
|
197
|
-
<img
|
|
198
|
-
src={iconArrowRight}
|
|
199
|
-
className="arroIconColour"
|
|
200
|
-
alt="Right Arrow"
|
|
201
|
-
/>
|
|
202
|
-
</div>
|
|
203
|
-
</div> */}
|
|
204
133
|
</div>
|
|
205
134
|
</div>
|
|
206
135
|
</div>
|
|
@@ -2,8 +2,8 @@ import React, { useState } from "react";
|
|
|
2
2
|
// import { FormattedMessage } from "react-intl";
|
|
3
3
|
import ShareIcon from "../../assets/images/icon_share_1.svg";
|
|
4
4
|
import locationIcon from "../../assets/images/locationIconBlack.svg";
|
|
5
|
-
import PopUp from "../ImageListPopup/ImageListPopup";
|
|
6
5
|
import "./PropertyDetailsHeader.css";
|
|
6
|
+
import PopUp from "../SharePopup/PopUp";
|
|
7
7
|
|
|
8
8
|
export interface PopupProps {
|
|
9
9
|
property: {
|
|
@@ -13,7 +13,7 @@ export interface PopupProps {
|
|
|
13
13
|
propertyArea: string;
|
|
14
14
|
askingPrice: string;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
title: string;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export default function PropertyDetailsHeader(props: PopupProps) {
|
|
@@ -26,13 +26,10 @@ export default function PropertyDetailsHeader(props: PopupProps) {
|
|
|
26
26
|
return (
|
|
27
27
|
<div className="Pheader compact d-flex col-12 col-lg-12 position-relative mt-5 ">
|
|
28
28
|
<div className="header_Text d-flex col-lg-7 col-md-9 mt-4 ms-4 ">
|
|
29
|
-
<strong>
|
|
30
|
-
Einziehen ohne einen Pinselstrich - Kernsaniertes Einfamilienhaus in
|
|
31
|
-
top Lage
|
|
32
|
-
</strong>
|
|
29
|
+
<strong>{props.title ?? "-"}</strong>
|
|
33
30
|
</div>
|
|
34
31
|
<div className="header_Text text-truncate col-lg-6 col-md-7 d-flex flex-row position-absolute ms-4">
|
|
35
|
-
<img src={locationIcon} className="vector me-2" />
|
|
32
|
+
<img src={locationIcon} className="vector me-2" alt="location Icon" />
|
|
36
33
|
|
|
37
34
|
<div className="propText text-truncate col-lg-6 col-md-6 d-flex align-items-center">
|
|
38
35
|
{props.property.city}
|
|
@@ -40,7 +37,12 @@ export default function PropertyDetailsHeader(props: PopupProps) {
|
|
|
40
37
|
</div>
|
|
41
38
|
<div className="d-flex col-lg-5 col-md-6 col-sm-5 justify-content-end position-absolute end-0 mt-4">
|
|
42
39
|
{/* <img src={Hearticon} alt="Location Icon" className="v_share me-3" /> */}
|
|
43
|
-
<img
|
|
40
|
+
<img
|
|
41
|
+
src={ShareIcon}
|
|
42
|
+
alt="share icon"
|
|
43
|
+
className="v_share me-3"
|
|
44
|
+
onClick={handlePopUp}
|
|
45
|
+
/>
|
|
44
46
|
</div>
|
|
45
47
|
<div className="fetch_section d-flex align-items-center flex-row col-lg-5 col-md-6 col-sm-5 justify-content-end position-absolute end-0">
|
|
46
48
|
{props && (
|
|
@@ -52,14 +54,14 @@ export default function PropertyDetailsHeader(props: PopupProps) {
|
|
|
52
54
|
{props && (
|
|
53
55
|
<div className="propText col-lg-3 col-md-3 d-flex h-100 align-items-center justify-content-center">
|
|
54
56
|
{props.property.constructedArea} m² <br />
|
|
55
|
-
|
|
57
|
+
Wohnfläche
|
|
56
58
|
{/* <FormattedMessage id="LIVING_SPACE" /> */}
|
|
57
59
|
</div>
|
|
58
60
|
)}
|
|
59
61
|
{props && (
|
|
60
62
|
<div className="propText col-lg-3 col-md-3 d-flex h-100 align-items-center justify-content-center">
|
|
61
63
|
{props.property.rooms} <br />
|
|
62
|
-
|
|
64
|
+
Zimmer
|
|
63
65
|
{/* <FormattedMessage id="ROOMS" /> */}
|
|
64
66
|
</div>
|
|
65
67
|
)}
|
|
@@ -72,11 +74,11 @@ export default function PropertyDetailsHeader(props: PopupProps) {
|
|
|
72
74
|
</div>
|
|
73
75
|
)}
|
|
74
76
|
</div>
|
|
75
|
-
{
|
|
77
|
+
{showPopUp && (
|
|
76
78
|
<PopUp
|
|
77
|
-
|
|
79
|
+
onClick={handlePopUp}
|
|
78
80
|
/>
|
|
79
|
-
)}
|
|
81
|
+
)}
|
|
80
82
|
</div>
|
|
81
83
|
);
|
|
82
84
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
// import { useParams } from "react-router-dom";
|
|
1
|
+
import React, { useRef, useState } from "react";
|
|
3
2
|
import iconArrowRight from "../../assets/Images/Icon_rightArrow.svg";
|
|
4
3
|
import blcIconArrowRight from "../../assets/Images/blackarrow-Right.svg";
|
|
5
4
|
import blcIconArrowLeft from "../../assets/Images/blckarrow-Left.svg";
|
|
@@ -12,36 +11,15 @@ import ImageListPopup from "../ImageListPopup/ImageListPopup";
|
|
|
12
11
|
import PopupProps from "../ImageListPopup/ImageListPopup";
|
|
13
12
|
|
|
14
13
|
interface PopupProps {
|
|
15
|
-
|
|
16
|
-
city: string;
|
|
17
|
-
constructedArea: string;
|
|
18
|
-
rooms: string;
|
|
19
|
-
propertyArea: string;
|
|
20
|
-
askingPrice: string;
|
|
21
|
-
};
|
|
22
|
-
pictureUrls: any[];
|
|
23
|
-
imageListRef: any;
|
|
14
|
+
pictureUrls: { title: string; url: string }[];
|
|
24
15
|
}
|
|
25
16
|
export default function PropertyImageList(prop: PopupProps) {
|
|
26
|
-
const [mainImage, setMainImage] = useState(null);
|
|
27
17
|
const [currentImageIndex, setCurrentImageIndex] = useState(0);
|
|
28
18
|
const [isImagePopupOpen, setIsImagePopupOpen] = useState(false);
|
|
29
|
-
const imageListRef = useRef(null);
|
|
30
|
-
const [open, setopen] = useState<boolean>(false);
|
|
31
|
-
// const [pictureUrls, setPictureUrls] = useState([]);
|
|
32
|
-
|
|
33
|
-
// const baseUrl = "https://api-dev.nestiq.de";
|
|
34
|
-
// const pictureUrls = prop.property.pictures.map(
|
|
35
|
-
// (picture) => `${baseUrl}${picture.contentUrl}`
|
|
36
|
-
// );
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
if (prop.pictureUrls.length > 0) {
|
|
39
|
-
setMainImage(prop.pictureUrls[0]);
|
|
40
|
-
}
|
|
41
|
-
}, [prop.pictureUrls]);
|
|
19
|
+
const imageListRef = useRef<HTMLDivElement | null>(null);
|
|
42
20
|
|
|
43
21
|
const handleArrowClickInMainImage = (direction: any) => {
|
|
44
|
-
if (
|
|
22
|
+
if (prop.pictureUrls.length === 0) return;
|
|
45
23
|
|
|
46
24
|
let newIndex = currentImageIndex;
|
|
47
25
|
if (direction === "left") {
|
|
@@ -53,9 +31,11 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
53
31
|
}
|
|
54
32
|
|
|
55
33
|
setCurrentImageIndex(newIndex);
|
|
56
|
-
setMainImage(prop.pictureUrls[newIndex]);
|
|
57
34
|
|
|
58
|
-
|
|
35
|
+
imageListRef.current!.scrollTo({
|
|
36
|
+
left: newIndex * 150,
|
|
37
|
+
behavior: "smooth",
|
|
38
|
+
});
|
|
59
39
|
};
|
|
60
40
|
|
|
61
41
|
const toggleAllPhotos = () => {
|
|
@@ -67,7 +47,7 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
67
47
|
<div
|
|
68
48
|
className="col-12 rounded-5 mainImage d-flex position-relative align-items-center"
|
|
69
49
|
style={{
|
|
70
|
-
backgroundImage: `url(${prop.pictureUrls[currentImageIndex]})`,
|
|
50
|
+
backgroundImage: `url(${prop.pictureUrls[currentImageIndex]?.url})`,
|
|
71
51
|
backgroundSize: "cover",
|
|
72
52
|
backgroundPosition: "center",
|
|
73
53
|
}}
|
|
@@ -114,16 +94,15 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
114
94
|
className="col-lg-10 rounded-3 h-100 d-flex flex-row gap-2 overflow-auto ms-1"
|
|
115
95
|
ref={imageListRef}
|
|
116
96
|
>
|
|
117
|
-
{prop.
|
|
97
|
+
{prop.pictureUrls.length > 0 && (
|
|
118
98
|
<div className="col-lg-5 h-100 d-flex gap-2 flex-row rounded-3">
|
|
119
|
-
{prop.pictureUrls.map((
|
|
99
|
+
{prop.pictureUrls.map((picture, index) => (
|
|
120
100
|
<div
|
|
121
101
|
key={index}
|
|
122
102
|
className="col-lg-12 h-100 d-flex"
|
|
123
103
|
onClick={() => {
|
|
124
|
-
setMainImage(imageUrl);
|
|
125
104
|
setCurrentImageIndex(index);
|
|
126
|
-
|
|
105
|
+
imageListRef.current!.scrollTo({
|
|
127
106
|
left: index * 150,
|
|
128
107
|
behavior: "smooth",
|
|
129
108
|
});
|
|
@@ -131,7 +110,7 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
131
110
|
role="button"
|
|
132
111
|
>
|
|
133
112
|
<img
|
|
134
|
-
src={
|
|
113
|
+
src={picture.url}
|
|
135
114
|
alt={`Image ${index + 1}`}
|
|
136
115
|
className="col-12 h-100 rounded-3 object-fit-cover"
|
|
137
116
|
/>
|
|
@@ -188,15 +167,7 @@ export default function PropertyImageList(prop: PopupProps) {
|
|
|
188
167
|
</div>
|
|
189
168
|
|
|
190
169
|
{/* Popup for all photos */}
|
|
191
|
-
{isImagePopupOpen &&
|
|
192
|
-
<ImageListPopup
|
|
193
|
-
currentImageIndex={currentImageIndex}
|
|
194
|
-
handleArrowClickInMainImage={handleArrowClickInMainImage}
|
|
195
|
-
imageListRef={imageListRef}
|
|
196
|
-
pictureUrls={prop.pictureUrls}
|
|
197
|
-
property={prop.property}
|
|
198
|
-
/>
|
|
199
|
-
)}
|
|
170
|
+
{isImagePopupOpen && <ImageListPopup pictureUrls={prop.pictureUrls} />}
|
|
200
171
|
</div>
|
|
201
172
|
);
|
|
202
173
|
}
|