hey-pharmacist-ecommerce 1.1.5 → 1.1.6
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 +12 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/AddressFormModal.tsx +13 -5
package/dist/index.mjs
CHANGED
|
@@ -8848,8 +8848,18 @@ function AddressFormModal({ isOpen, onClose, onAddressAdded, onAddressUpdated, i
|
|
|
8848
8848
|
country: initialAddress?.country || "United States"
|
|
8849
8849
|
}
|
|
8850
8850
|
});
|
|
8851
|
-
|
|
8852
|
-
|
|
8851
|
+
useEffect(() => {
|
|
8852
|
+
reset({
|
|
8853
|
+
name: initialAddress?.name || "",
|
|
8854
|
+
phone: initialAddress?.phone || "",
|
|
8855
|
+
street1: initialAddress?.street1 || "",
|
|
8856
|
+
street2: initialAddress?.street2 || "",
|
|
8857
|
+
city: initialAddress?.city || "",
|
|
8858
|
+
state: initialAddress?.state || "",
|
|
8859
|
+
zip: initialAddress?.zip || "",
|
|
8860
|
+
country: initialAddress?.country || "United States"
|
|
8861
|
+
});
|
|
8862
|
+
}, [initialAddress, reset]);
|
|
8853
8863
|
const onSubmit = async (data) => {
|
|
8854
8864
|
setIsSubmitting(true);
|
|
8855
8865
|
try {
|