hey-pharmacist-ecommerce 1.1.4 → 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 CHANGED
@@ -8784,6 +8784,7 @@ function Card({ className = "", ...props }) {
8784
8784
  }
8785
8785
  function Modal({ isOpen, onClose, title, children, size = "md" }) {
8786
8786
  React20.useEffect(() => {
8787
+ if (typeof window === "undefined") return;
8787
8788
  if (isOpen) {
8788
8789
  document.body.style.overflow = "hidden";
8789
8790
  } else {
@@ -8857,8 +8858,18 @@ function AddressFormModal({ isOpen, onClose, onAddressAdded, onAddressUpdated, i
8857
8858
  country: initialAddress?.country || "United States"
8858
8859
  }
8859
8860
  });
8860
- React20.useState(() => {
8861
- });
8861
+ React20.useEffect(() => {
8862
+ reset({
8863
+ name: initialAddress?.name || "",
8864
+ phone: initialAddress?.phone || "",
8865
+ street1: initialAddress?.street1 || "",
8866
+ street2: initialAddress?.street2 || "",
8867
+ city: initialAddress?.city || "",
8868
+ state: initialAddress?.state || "",
8869
+ zip: initialAddress?.zip || "",
8870
+ country: initialAddress?.country || "United States"
8871
+ });
8872
+ }, [initialAddress, reset]);
8862
8873
  const onSubmit = async (data) => {
8863
8874
  setIsSubmitting(true);
8864
8875
  try {