hey-pharmacist-ecommerce 1.1.5 → 1.1.7
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/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/AddressFormModal.tsx +13 -5
- package/src/lib/Apis/wrapper.ts +6 -2
package/dist/index.mjs
CHANGED
|
@@ -6874,11 +6874,14 @@ globalAxios4.interceptors.request.use(async (config) => {
|
|
|
6874
6874
|
}
|
|
6875
6875
|
return config;
|
|
6876
6876
|
});
|
|
6877
|
-
var
|
|
6877
|
+
var abortController;
|
|
6878
|
+
if (typeof window !== "undefined") {
|
|
6879
|
+
abortController = new AbortController();
|
|
6880
|
+
}
|
|
6878
6881
|
var AXIOS_CONFIG = new Configuration({
|
|
6879
6882
|
basePath: BaseUrl,
|
|
6880
6883
|
baseOptions: {
|
|
6881
|
-
signal:
|
|
6884
|
+
signal: abortController?.signal,
|
|
6882
6885
|
timeout: 2e4
|
|
6883
6886
|
}
|
|
6884
6887
|
});
|
|
@@ -8848,8 +8851,18 @@ function AddressFormModal({ isOpen, onClose, onAddressAdded, onAddressUpdated, i
|
|
|
8848
8851
|
country: initialAddress?.country || "United States"
|
|
8849
8852
|
}
|
|
8850
8853
|
});
|
|
8851
|
-
|
|
8852
|
-
|
|
8854
|
+
useEffect(() => {
|
|
8855
|
+
reset({
|
|
8856
|
+
name: initialAddress?.name || "",
|
|
8857
|
+
phone: initialAddress?.phone || "",
|
|
8858
|
+
street1: initialAddress?.street1 || "",
|
|
8859
|
+
street2: initialAddress?.street2 || "",
|
|
8860
|
+
city: initialAddress?.city || "",
|
|
8861
|
+
state: initialAddress?.state || "",
|
|
8862
|
+
zip: initialAddress?.zip || "",
|
|
8863
|
+
country: initialAddress?.country || "United States"
|
|
8864
|
+
});
|
|
8865
|
+
}, [initialAddress, reset]);
|
|
8853
8866
|
const onSubmit = async (data) => {
|
|
8854
8867
|
setIsSubmitting(true);
|
|
8855
8868
|
try {
|