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.mjs CHANGED
@@ -8774,6 +8774,7 @@ function Card({ className = "", ...props }) {
8774
8774
  }
8775
8775
  function Modal({ isOpen, onClose, title, children, size = "md" }) {
8776
8776
  useEffect(() => {
8777
+ if (typeof window === "undefined") return;
8777
8778
  if (isOpen) {
8778
8779
  document.body.style.overflow = "hidden";
8779
8780
  } else {
@@ -8847,8 +8848,18 @@ function AddressFormModal({ isOpen, onClose, onAddressAdded, onAddressUpdated, i
8847
8848
  country: initialAddress?.country || "United States"
8848
8849
  }
8849
8850
  });
8850
- useState(() => {
8851
- });
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]);
8852
8863
  const onSubmit = async (data) => {
8853
8864
  setIsSubmitting(true);
8854
8865
  try {