homeflowjs 0.9.26 → 0.9.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "0.9.26",
3
+ "version": "0.9.28",
4
4
  "description": "JavaScript toolkit for Homeflow themes",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,7 +15,7 @@ const PropertyLeafletMap = () => {
15
15
  return (
16
16
  <MapContainer
17
17
  center={[property.lat, property.lng]}
18
- zoom={100}
18
+ zoom={property?.agency_zoom_level || 100}
19
19
  scrollWheelZoom={false}
20
20
  style={{ height: '100%' }}
21
21
  >
@@ -9,8 +9,10 @@ const MarketingPreferencesForm = ({ buttonClass, buttonSpanClass, strict = false
9
9
  const [optInMarketing, setOptInMarketing] = useState(user.is_opted_in_to_marketing);
10
10
  const contactOption = user.is_opted_in_to_marketing ? 'OPTED IN to' : 'OPTED OUT of';
11
11
  const dispatch = useDispatch();
12
- const strictInputInId = 'opt-in-to-marketing';
13
- const strictInputOutId = 'opt-out-of-marketing';
12
+ const strictInputIds = {
13
+ in: 'opt-in-to-marketing',
14
+ out:'opt-out-of-marketing',
15
+ };
14
16
 
15
17
  const handleChange = (e) => {
16
18
  setOptInMarketing(e.target.value === 'optin');
@@ -73,9 +75,9 @@ const MarketingPreferencesForm = ({ buttonClass, buttonSpanClass, strict = false
73
75
  className="marketing-preferences__radio"
74
76
  checked={optInMarketing}
75
77
  onChange={handleChange}
76
- id={strict && strictInputInId}
78
+ id={strict ? strictInputIds.in : null}
77
79
  />
78
- {strict ? <label for={strictInputInId}>{iWishToOpt(true)}</label> : <span>{iWishToOpt(true)}</span>}
80
+ {strict ? <label htmlFor={strictInputIds.in}>{iWishToOpt(true)}</label> : <span>{iWishToOpt(true)}</span>}
79
81
  </div>
80
82
 
81
83
  <div className="marketing-preferences__option">
@@ -86,9 +88,9 @@ const MarketingPreferencesForm = ({ buttonClass, buttonSpanClass, strict = false
86
88
  className="marketing-preferences__radio"
87
89
  checked={!optInMarketing}
88
90
  onChange={handleChange}
89
- id={strict && strictInputOutId}
91
+ id={strict ? strictInputIds.out : null}
90
92
  />
91
- {strict ? <label for={strictInputOutId}>{iWishToOpt(false)}</label> : <span>{iWishToOpt(false)}</span>}
93
+ {strict ? <label htmlFor={strictInputIds.out}>{iWishToOpt(false)}</label> : <span>{iWishToOpt(false)}</span>}
92
94
  </div>
93
95
 
94
96
  <button type="submit" className={`marketing-preferences__submit ${buttonClass}`}>