nestiq-component-library 1.1.171 → 1.1.172

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.
@@ -1,29 +1,29 @@
1
- import React from "react";
2
- import closeIcon from "../../assets/images/icon_close_2.png";
3
- import "./Popup.css";
4
- import "../../styles/common.css";
5
-
6
- interface PopupProps {
7
- children: React.ReactNode;
8
- onCloseClick: () => void;
9
- }
10
-
11
- const Popup: React.FC<PopupProps> = ({ onCloseClick, children }) => {
12
- return (
13
- <div className="popup-overlay">
14
- <div className="shareSection col-12 d-flex position-relative flex-column mx-auto justify-content-center col-5 col-lg-6 d-flex gap-4">
15
- <div className="end-0 top-0 position-absolute ">
16
- <img
17
- src={closeIcon}
18
- alt="close"
19
- className="closeIcon me-2"
20
- onClick={onCloseClick}
21
- />
22
- </div>
23
- {children}
24
- </div>
25
- </div>
26
- );
27
- };
28
-
29
- export default Popup;
1
+ import React from "react";
2
+ import closeIcon from "../../assets/images/icon_close_2.png";
3
+ import "./Popup.css";
4
+ import "../../styles/common.css";
5
+
6
+ interface PopupProps {
7
+ children: React.ReactNode;
8
+ onCloseClick: () => void;
9
+ }
10
+
11
+ const Popup: React.FC<PopupProps> = ({ onCloseClick, children }) => {
12
+ return (
13
+ <div className="popup-overlay">
14
+ <div className="shareSection col-12 d-flex position-relative flex-column mx-auto justify-content-center col-5 col-lg-6 d-flex gap-4">
15
+ <div className="end-0 top-0 position-absolute ">
16
+ <img
17
+ src={closeIcon}
18
+ alt="close"
19
+ className="closeIcon me-2"
20
+ onClick={onCloseClick}
21
+ />
22
+ </div>
23
+ {children}
24
+ </div>
25
+ </div>
26
+ );
27
+ };
28
+
29
+ export default Popup;
@@ -57,6 +57,14 @@ export default function PropertyImageList(prop: PopupProps) {
57
57
  });
58
58
  };
59
59
 
60
+ const allPhotos =
61
+ prop.property.pictures
62
+ ?.filter((p) => p.pictureType?.id === 2)
63
+ .map((p, index) => ({
64
+ url: prop.baseUrl + p.contentUrl,
65
+ title: `Photo ${index + 1}`,
66
+ })) || [];
67
+
60
68
  const floorPlanImages =
61
69
  prop.property.pictures
62
70
  ?.filter((p) => p.pictureType?.id === 1)
@@ -229,7 +237,7 @@ export default function PropertyImageList(prop: PopupProps) {
229
237
  {/* Popup for all photos */}
230
238
  {isImagePopupOpen && (
231
239
  <ImageListPopup
232
- pictureUrls={prop.allPictureUrls}
240
+ pictureUrls={allPhotos}
233
241
  onClose={() => setIsImagePopupOpen(false)}
234
242
  />
235
243
  )}
@@ -1,25 +1,25 @@
1
- import React from "react";
2
- import { ToastContainer, toast } from "react-toastify";
3
-
4
- // Utility function to show a toast
5
- export const showToast = (
6
- message: string,
7
- type: "info" | "success" | "warning" | "error" = "info",
8
- ) => {
9
- toast(message, { type });
10
- };
11
-
12
- const ToastWrapper: React.FC = () => (
13
- <ToastContainer
14
- position="top-right"
15
- autoClose={5000}
16
- hideProgressBar={false}
17
- closeOnClick
18
- rtl={false}
19
- pauseOnFocusLoss
20
- draggable
21
- pauseOnHover
22
- />
23
- );
24
-
25
- export default ToastWrapper;
1
+ import React from "react";
2
+ import { ToastContainer, toast } from "react-toastify";
3
+
4
+ // Utility function to show a toast
5
+ export const showToast = (
6
+ message: string,
7
+ type: "info" | "success" | "warning" | "error" = "info",
8
+ ) => {
9
+ toast(message, { type });
10
+ };
11
+
12
+ const ToastWrapper: React.FC = () => (
13
+ <ToastContainer
14
+ position="top-right"
15
+ autoClose={5000}
16
+ hideProgressBar={false}
17
+ closeOnClick
18
+ rtl={false}
19
+ pauseOnFocusLoss
20
+ draggable
21
+ pauseOnHover
22
+ />
23
+ );
24
+
25
+ export default ToastWrapper;
@@ -1,7 +1,7 @@
1
- export interface MessageModel {
2
- themeId: string;
3
- subject: string;
4
- messageText: string;
5
- firstName: string;
6
- lastName: string;
7
- }
1
+ export interface MessageModel {
2
+ themeId: string;
3
+ subject: string;
4
+ messageText: string;
5
+ firstName: string;
6
+ lastName: string;
7
+ }