ordering-components-external 13.2.9 → 13.2.11
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/_bundles/{7.ordering-component.1a6a3f1c214a7e7ab0a1.js → 7.ordering-component.8b218857596fd318bf9f.js} +1 -1
- package/_bundles/{ordering-component.1a6a3f1c214a7e7ab0a1.js → ordering-component.8b218857596fd318bf9f.js} +2 -2
- package/_modules/components/BusinessReviews/index.js +3 -5
- package/_modules/constants/code-numbers.js +4 -0
- package/package.json +1 -1
- package/src/components/BusinessReviews/index.js +5 -5
- package/src/constants/code-numbers.js +1 -0
- /package/_bundles/{0.ordering-component.1a6a3f1c214a7e7ab0a1.js → 0.ordering-component.8b218857596fd318bf9f.js} +0 -0
- /package/_bundles/{1.ordering-component.1a6a3f1c214a7e7ab0a1.js → 1.ordering-component.8b218857596fd318bf9f.js} +0 -0
- /package/_bundles/{2.ordering-component.1a6a3f1c214a7e7ab0a1.js → 2.ordering-component.8b218857596fd318bf9f.js} +0 -0
- /package/_bundles/{4.ordering-component.1a6a3f1c214a7e7ab0a1.js → 4.ordering-component.8b218857596fd318bf9f.js} +0 -0
- /package/_bundles/{5.ordering-component.1a6a3f1c214a7e7ab0a1.js → 5.ordering-component.8b218857596fd318bf9f.js} +0 -0
- /package/_bundles/{6.ordering-component.1a6a3f1c214a7e7ab0a1.js → 6.ordering-component.8b218857596fd318bf9f.js} +0 -0
- /package/_bundles/{7.ordering-component.1a6a3f1c214a7e7ab0a1.js.LICENSE.txt → 7.ordering-component.8b218857596fd318bf9f.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-component.1a6a3f1c214a7e7ab0a1.js → 8.ordering-component.8b218857596fd318bf9f.js} +0 -0
- /package/_bundles/{ordering-component.1a6a3f1c214a7e7ab0a1.js.LICENSE.txt → ordering-component.8b218857596fd318bf9f.js.LICENSE.txt} +0 -0
|
@@ -75,7 +75,7 @@ var BusinessReviews = exports.BusinessReviews = function BusinessReviews(props)
|
|
|
75
75
|
};
|
|
76
76
|
var onChangeReview = function onChangeReview(text) {
|
|
77
77
|
var reviews = text !== '' ? reviewsList.filter(function (review) {
|
|
78
|
-
return review.comment.toLowerCase().includes(text === null || text === void 0 ? void 0 : text.toLowerCase());
|
|
78
|
+
return review.comment && review.comment.toLowerCase().includes(text === null || text === void 0 ? void 0 : text.toLowerCase());
|
|
79
79
|
}) : reviewsList;
|
|
80
80
|
setBusinessReviewsList(_objectSpread(_objectSpread({}, businessReviewsList), {}, {
|
|
81
81
|
loading: false,
|
|
@@ -159,9 +159,7 @@ var BusinessReviews = exports.BusinessReviews = function BusinessReviews(props)
|
|
|
159
159
|
}, []);
|
|
160
160
|
(0, _react.useEffect)(function () {
|
|
161
161
|
if (!(reviews !== null && reviews !== void 0 && reviews.length)) return;
|
|
162
|
-
var reviewsListing = sortReviews(reviews
|
|
163
|
-
return r.comment;
|
|
164
|
-
}));
|
|
162
|
+
var reviewsListing = sortReviews(reviews);
|
|
165
163
|
if (!searchValue) {
|
|
166
164
|
setBusinessReviewsList(_objectSpread(_objectSpread({}, businessReviewsList), {}, {
|
|
167
165
|
reviews: reviewsListing,
|
|
@@ -170,7 +168,7 @@ var BusinessReviews = exports.BusinessReviews = function BusinessReviews(props)
|
|
|
170
168
|
} else {
|
|
171
169
|
setBusinessReviewsList(_objectSpread(_objectSpread({}, businessReviewsList), {}, {
|
|
172
170
|
reviews: reviewsListing.filter(function (item) {
|
|
173
|
-
return item.comment.toLowerCase().includes(searchValue.toLowerCase());
|
|
171
|
+
return item.comment && item.comment.toLowerCase().includes(searchValue.toLowerCase());
|
|
174
172
|
}),
|
|
175
173
|
loading: false
|
|
176
174
|
}));
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ export const BusinessReviews = (props) => {
|
|
|
11
11
|
|
|
12
12
|
const [ordering] = useApi()
|
|
13
13
|
const requestsState = {}
|
|
14
|
-
const [searchValue, setSearchValue] = useState(null)
|
|
14
|
+
const [searchValue, setSearchValue] = useState(null)
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* businessReviewsList, this must be contain a reviews, loading and error to send UIComponent
|
|
@@ -40,7 +40,7 @@ export const BusinessReviews = (props) => {
|
|
|
40
40
|
|
|
41
41
|
const onChangeReview = (text) => {
|
|
42
42
|
const reviews = text !== ''
|
|
43
|
-
? reviewsList.filter(review => review.comment.toLowerCase().includes(text?.toLowerCase()))
|
|
43
|
+
? reviewsList.filter(review => review.comment && review.comment.toLowerCase().includes(text?.toLowerCase()))
|
|
44
44
|
: reviewsList
|
|
45
45
|
setBusinessReviewsList({
|
|
46
46
|
...businessReviewsList,
|
|
@@ -111,7 +111,7 @@ export const BusinessReviews = (props) => {
|
|
|
111
111
|
|
|
112
112
|
useEffect(() => {
|
|
113
113
|
if (!reviews?.length) return
|
|
114
|
-
const reviewsListing = sortReviews(reviews
|
|
114
|
+
const reviewsListing = sortReviews(reviews)
|
|
115
115
|
if (!searchValue) {
|
|
116
116
|
setBusinessReviewsList({
|
|
117
117
|
...businessReviewsList,
|
|
@@ -121,11 +121,11 @@ export const BusinessReviews = (props) => {
|
|
|
121
121
|
} else {
|
|
122
122
|
setBusinessReviewsList({
|
|
123
123
|
...businessReviewsList,
|
|
124
|
-
reviews: reviewsListing.filter(item => item.comment.toLowerCase().includes(searchValue.toLowerCase())),
|
|
124
|
+
reviews: reviewsListing.filter(item => item.comment && item.comment.toLowerCase().includes(searchValue.toLowerCase())),
|
|
125
125
|
loading: false
|
|
126
126
|
})
|
|
127
127
|
}
|
|
128
|
-
}, [searchValue])
|
|
128
|
+
}, [searchValue])
|
|
129
129
|
|
|
130
130
|
return (
|
|
131
131
|
<>
|
|
@@ -187,6 +187,7 @@ export const CODES = [
|
|
|
187
187
|
{ countryCode: 'SI', phoneCode: '963', countryName: 'Syria' },
|
|
188
188
|
{ countryCode: 'TW', phoneCode: '886', countryName: 'Taiwan' },
|
|
189
189
|
{ countryCode: 'TJ', phoneCode: '7', countryName: 'Tajikst' },
|
|
190
|
+
{ countryCode: 'TZ', phoneCode: '255', countryName: 'Tanzania' },
|
|
190
191
|
{ countryCode: 'TH', phoneCode: '66', countryName: 'Thailand' },
|
|
191
192
|
{ countryCode: 'TG', phoneCode: '228', countryName: 'Togo' },
|
|
192
193
|
{ countryCode: 'TO', phoneCode: '676', countryName: 'Tonga' },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|