nestiq-component-library 1.1.33 → 1.1.35

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.
@@ -21,16 +21,14 @@ export default function PropertyDetailsHeader(props: PopupProps) {
21
21
  const [showPopUp, setShowPopUp] = useState(false);
22
22
  const area = props.property?.propertyArea;
23
23
 
24
- const handlePopUp = () => {
25
- setShowPopUp(!showPopUp);
26
- };
24
+ const handleOpenPopup = () => setShowPopUp(true);
25
+
26
+ const handleClosePopup = () => setShowPopUp(false);
27
27
 
28
28
  return (
29
29
  <div className="Pheader compact d-flex flex-column flex-md-row d-flex col-12 col-lg-12 mt-5 ">
30
30
  <div className="header_Text d-flex col-5 col-lg-7 col-md-9 mt-4 ms-4 ">
31
- <strong>
32
- {props.title ?? "-"}
33
- </strong>
31
+ <strong>{props.title ?? "-"}</strong>
34
32
  </div>
35
33
  <div className="compact3 position-absolute header_Text text-truncate col-5 col-lg-5 col-md-5 d-flex flex-row ms-4">
36
34
  <img src={locationIcon} className="vector me-2" alt="location Icon" />
@@ -44,7 +42,7 @@ export default function PropertyDetailsHeader(props: PopupProps) {
44
42
  src={ShareIcon}
45
43
  alt="share icon"
46
44
  className="v_share me-3"
47
- onClick={handlePopUp}
45
+ onClick={handleOpenPopup}
48
46
  />
49
47
  </div>
50
48
  <div className="compact2 gap-3 gap-md-0 fetch_section d-flex align-items-center flex-column flex-md-row col-lg-5 col-md-6 col-sm-5 justify-content-end position-absolute end-0">
@@ -60,7 +58,7 @@ export default function PropertyDetailsHeader(props: PopupProps) {
60
58
  {props && (
61
59
  <div className="propText col-lg-3 col-md-3 d-flex h-100 align-items-md-center justify-content-center flex-column">
62
60
  <span className="propText2">
63
- {formatPropertyArea(props.property.constructedArea) ?? 0}
61
+ {formatPropertyArea(props.property.constructedArea) ?? 0}
64
62
  </span>
65
63
  <span>Wohnfläche</span>
66
64
  {/* <FormattedMessage id="LIVING_SPACE" /> */}
@@ -68,9 +66,7 @@ export default function PropertyDetailsHeader(props: PopupProps) {
68
66
  )}
69
67
  {props && (
70
68
  <div className="propText col-lg-3 col-md-3 d-flex h-100 align-items-center justify-content-center flex-column">
71
- <span className="propText2">
72
- {props.property.rooms}
73
- </span>
69
+ <span className="propText2">{props.property.rooms}</span>
74
70
  <span>Zimmer</span>
75
71
  {/* <FormattedMessage id="ROOMS" /> */}
76
72
  </div>
@@ -85,7 +81,7 @@ export default function PropertyDetailsHeader(props: PopupProps) {
85
81
  </div>
86
82
  )}
87
83
  </div>
88
- {showPopUp && <SharePopup />}
84
+ {showPopUp && <SharePopup onClick={() => handleClosePopup()} /> }
89
85
  </div>
90
86
  );
91
87
  }
@@ -10,7 +10,7 @@ import { toast } from "react-toastify";
10
10
  import "../../styles/common.css";
11
11
 
12
12
  interface PopupProps {
13
- onClick:String | any;
13
+ onClick: String | any;
14
14
  }
15
15
  export default function SharePopup(props: PopupProps) {
16
16
  const [showPopUp, setShowPopUp] = useState(true);
@@ -18,6 +18,7 @@ export default function SharePopup(props: PopupProps) {
18
18
  const handleClose = () => {
19
19
  props.onClick();
20
20
  };
21
+
21
22
  const urlInputRef = useRef<HTMLInputElement | null>(null);
22
23
 
23
24
  const copyToClipboard = () => {