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.js
CHANGED
|
@@ -6884,11 +6884,14 @@ globalAxios4__default.default.interceptors.request.use(async (config) => {
|
|
|
6884
6884
|
}
|
|
6885
6885
|
return config;
|
|
6886
6886
|
});
|
|
6887
|
-
var
|
|
6887
|
+
var abortController;
|
|
6888
|
+
if (typeof window !== "undefined") {
|
|
6889
|
+
abortController = new AbortController();
|
|
6890
|
+
}
|
|
6888
6891
|
var AXIOS_CONFIG = new Configuration({
|
|
6889
6892
|
basePath: BaseUrl,
|
|
6890
6893
|
baseOptions: {
|
|
6891
|
-
signal:
|
|
6894
|
+
signal: abortController?.signal,
|
|
6892
6895
|
timeout: 2e4
|
|
6893
6896
|
}
|
|
6894
6897
|
});
|
|
@@ -8858,8 +8861,18 @@ function AddressFormModal({ isOpen, onClose, onAddressAdded, onAddressUpdated, i
|
|
|
8858
8861
|
country: initialAddress?.country || "United States"
|
|
8859
8862
|
}
|
|
8860
8863
|
});
|
|
8861
|
-
React20.
|
|
8862
|
-
|
|
8864
|
+
React20.useEffect(() => {
|
|
8865
|
+
reset({
|
|
8866
|
+
name: initialAddress?.name || "",
|
|
8867
|
+
phone: initialAddress?.phone || "",
|
|
8868
|
+
street1: initialAddress?.street1 || "",
|
|
8869
|
+
street2: initialAddress?.street2 || "",
|
|
8870
|
+
city: initialAddress?.city || "",
|
|
8871
|
+
state: initialAddress?.state || "",
|
|
8872
|
+
zip: initialAddress?.zip || "",
|
|
8873
|
+
country: initialAddress?.country || "United States"
|
|
8874
|
+
});
|
|
8875
|
+
}, [initialAddress, reset]);
|
|
8863
8876
|
const onSubmit = async (data) => {
|
|
8864
8877
|
setIsSubmitting(true);
|
|
8865
8878
|
try {
|