homeflowjs 0.10.14 → 0.10.16

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.
@@ -30,6 +30,8 @@ export const fetchUser = () => (dispatch) => {
30
30
  // if the user is logged in, fetch saved searches and properties
31
31
  dispatch(fetchSavedProperties());
32
32
  dispatch(fetchSavedSearches());
33
+
34
+ Homeflow.kickEvent('user_signed_in');
33
35
  } else {
34
36
  // load saved properties and searches from localStorage
35
37
  const serializedSavedSearches = localStorage.getItem('savedSearches');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "0.10.14",
3
+ "version": "0.10.16",
4
4
  "description": "JavaScript toolkit for Homeflow themes",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,6 +17,7 @@ const SavePropertyButton = (props) => {
17
17
  removeSavedProperty,
18
18
  style,
19
19
  notificationMessage,
20
+ notifyConfig,
20
21
  } = props;
21
22
 
22
23
  const isSaved = !!savedProperties.find((p) => p.property_id === parseInt(propertyId, 10));
@@ -27,10 +28,11 @@ const SavePropertyButton = (props) => {
27
28
 
28
29
  if (isSaved) {
29
30
  removeSavedProperty(propertyId);
30
- notify(notificationMessage || 'Saved property removed.', 'success');
31
+ notify(notificationMessage || 'Saved property removed.', 'success', notifyConfig);
31
32
  } else {
32
33
  addSavedProperty(propertyId);
33
- notify(notificationMessage || 'Property saved.', 'success');
34
+ Homeflow.kickEvent('saved_property_added', propertyId);
35
+ notify(notificationMessage || 'Property saved.', 'success', notifyConfig);
34
36
  }
35
37
  };
36
38
 
@@ -56,6 +58,7 @@ SavePropertyButton.propTypes = {
56
58
  SavedComponent: PropTypes.element.isRequired,
57
59
  addSavedProperty: PropTypes.func.isRequired,
58
60
  removeSavedProperty: PropTypes.func.isRequired,
61
+ notifyConfig: PropTypes.object,
59
62
  };
60
63
 
61
64
  SavePropertyButton.defaultProps = {
@@ -63,6 +66,7 @@ SavePropertyButton.defaultProps = {
63
66
  notificationMessage: null,
64
67
  className: '',
65
68
  style: {},
69
+ notifyConfig: {},
66
70
  };
67
71
 
68
72
  const mapStateToProps = (state) => ({
@@ -77,9 +77,10 @@ const ReactSelect = (props) => {
77
77
  bedOptionText,
78
78
  } = props;
79
79
 
80
- const bedOptions = bedValues.map((bedValue) => (
81
- { value: bedValue, label: `${bedValue} ${bedOptionText}` }
82
- ));
80
+ const bedOptions = bedValues.map((bedValue) => ({
81
+ value: bedValue,
82
+ label: `${bedValue} ${bedOptionText}${bedValue > 1 ? 's' : ''}`,
83
+ }));
83
84
 
84
85
  if (value) bedOptions.unshift({ value: '', label: `No ${type} beds` });
85
86
 
@@ -31,6 +31,7 @@ const SaveSearchButton = (props) => {
31
31
  notify((showNotification && notificationMessage) ? notificationMessage : 'Saved search removed.', 'success');
32
32
  } else {
33
33
  addSavedSearchAsync(search);
34
+ Homeflow.kickEvent('saved_search_added');
34
35
  notify(notificationMessage || 'Search saved.', 'success');
35
36
  }
36
37
  };
@@ -4,10 +4,23 @@
4
4
  font-size: 12px;
5
5
  }
6
6
 
7
+ .account-not-signed-in {
8
+ display: flex;
9
+ flex-direction: column;
10
+
11
+ @media (min-width: 700px) {
12
+ flex-direction: row;
13
+ }
14
+ }
15
+
7
16
  .account-register,
8
17
  .account-sign-in {
9
18
  display: inline-block;
10
- width: 50%;
19
+ width: 100%;
20
+
21
+ @media (min-width: 700px) {
22
+ width: 50%;
23
+ }
11
24
  }
12
25
 
13
26
  .account-register {
@@ -16,6 +29,11 @@
16
29
 
17
30
  .account-sign-in {
18
31
  padding: 12px 50px 0 25px;
32
+ margin-top: 3rem;
33
+
34
+ @media (min-width: 700px) {
35
+ margin-top: 0;
36
+ }
19
37
  }
20
38
 
21
39
  .account-tab {