ublo-lib 1.14.14 → 1.15.0
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.
|
@@ -60,7 +60,7 @@ function ContactForm({
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
}, [widgetLang]);
|
|
63
|
-
const handleCategory = React.useCallback(
|
|
63
|
+
const handleCategory = React.useCallback(params => {
|
|
64
64
|
const needCategory = params?.categories?.length > 1;
|
|
65
65
|
setNeedCategory(needCategory);
|
|
66
66
|
if (!needCategory) {
|
|
@@ -70,7 +70,7 @@ function ContactForm({
|
|
|
70
70
|
update(true, "category", undefined, []);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
}, [
|
|
73
|
+
}, [update]);
|
|
74
74
|
React.useEffect(() => {
|
|
75
75
|
const getParams = async () => {
|
|
76
76
|
const params = await API.fetchParams(widgetLang, resort, merchant, channel, categories, integration, uat);
|
|
@@ -78,7 +78,7 @@ function ContactForm({
|
|
|
78
78
|
setHasError(true);
|
|
79
79
|
} else {
|
|
80
80
|
setParams(params);
|
|
81
|
-
handleCategory();
|
|
81
|
+
handleCategory(params);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
getParams();
|
|
@@ -145,7 +145,7 @@ function ContactForm({
|
|
|
145
145
|
Subject: subject?.label
|
|
146
146
|
});
|
|
147
147
|
setFields(Data.DEFAULT_FIELDS);
|
|
148
|
-
handleCategory();
|
|
148
|
+
handleCategory(params);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
setSubmiting(false);
|