homeflowjs 1.0.73 → 1.0.75
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.
@@ -10,9 +10,9 @@ import {
|
|
10
10
|
|
11
11
|
const BranchLeafletMap = ({ iconConfig, CustomPopup }) => {
|
12
12
|
const branch = Homeflow.get('branch');
|
13
|
-
|
14
13
|
const customIcon = Homeflow.get('custom_map_icon');
|
15
14
|
const customIconAnchor = Homeflow.get('custom_map_icon_anchor');
|
15
|
+
const customDivIcon = Homeflow.get('custom_branch_pin');
|
16
16
|
|
17
17
|
const defaultIconConfig = {
|
18
18
|
iconRetinaUrl: customIcon || '/assets/marker-icon.png',
|
@@ -21,7 +21,9 @@ const BranchLeafletMap = ({ iconConfig, CustomPopup }) => {
|
|
21
21
|
iconAnchor: customIconAnchor || [12, 41],
|
22
22
|
};
|
23
23
|
|
24
|
-
|
24
|
+
let icon = L.icon(iconConfig || defaultIconConfig);
|
25
|
+
|
26
|
+
if (customDivIcon) icon = L.divIcon(customDivIcon);
|
25
27
|
|
26
28
|
return (
|
27
29
|
<MapContainer
|
package/package.json
CHANGED
@@ -8,14 +8,17 @@ const PropertyLeafletMap = ({ CustomPopup, leafletWhenReady }) => {
|
|
8
8
|
const customIcon = Homeflow.get('custom_map_icon');
|
9
9
|
const customIconShadow = Homeflow.get('custom_map_icon_shadow');
|
10
10
|
const customIconAnchor = Homeflow.get('custom_map_icon_anchor');
|
11
|
+
const customDivIcon = Homeflow.get('custom_property_pin');
|
11
12
|
|
12
|
-
|
13
|
+
let icon = L.icon({
|
13
14
|
iconRetinaUrl: customIcon || '/assets/marker-icon.png',
|
14
15
|
iconUrl: customIcon || '/assets/marker-icon.png',
|
15
16
|
shadowUrl: customIconShadow || '/assets/marker-shadow.png',
|
16
17
|
iconAnchor: customIconAnchor || [12, 41],
|
17
18
|
});
|
18
19
|
|
20
|
+
if (customDivIcon) icon = L.divIcon(customDivIcon);
|
21
|
+
|
19
22
|
return (
|
20
23
|
<MapContainer
|
21
24
|
center={[property.lat, property.lng]}
|
@@ -30,7 +33,7 @@ const PropertyLeafletMap = ({ CustomPopup, leafletWhenReady }) => {
|
|
30
33
|
attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
31
34
|
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
32
35
|
/>
|
33
|
-
<Marker position={[property.lat, property.lng]} icon={
|
36
|
+
<Marker position={[property.lat, property.lng]} icon={icon}>
|
34
37
|
{CustomPopup && (
|
35
38
|
<Popup>
|
36
39
|
<CustomPopup property={property} />
|
@@ -52,12 +52,12 @@ const UserRegisterForm = (props) => {
|
|
52
52
|
window.location.hash = redirectHash;
|
53
53
|
}
|
54
54
|
})
|
55
|
-
.catch(() => {
|
55
|
+
.catch((errors) => {
|
56
56
|
if (userParams?.body) {
|
57
57
|
window.location.href = '/';
|
58
58
|
} else if(errors?.password){
|
59
59
|
// this could be used for any kind of errors but we only need it for password errors right now
|
60
|
-
errors.password
|
60
|
+
errors.password?.forEach((error) => notify(error, 'error', { duration: 8000 }))
|
61
61
|
} else {
|
62
62
|
notify(
|
63
63
|
'Sorry, something went wrong. You may already have an account with this email address, if so, please try signing in instead of registering.',
|