@aws505/sheetsite 1.0.10 → 1.1.0

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.
@@ -848,17 +848,17 @@ function Hero({
848
848
  }
849
849
  };
850
850
  const handleDirectionsClick = () => {
851
- if (business.googleMapsUrl) {
852
- window.open(business.googleMapsUrl, "_blank");
853
- } else {
854
- const address = [
855
- business.addressLine1,
856
- business.city,
857
- business.state,
858
- business.zip
859
- ].filter(Boolean).join(", ");
860
- window.open(`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(address)}`, "_blank");
861
- }
851
+ const addressParts = [
852
+ business.name,
853
+ business.addressLine1,
854
+ business.addressLine2,
855
+ business.city,
856
+ business.state,
857
+ business.zip
858
+ ].filter(Boolean);
859
+ const fullAddress = addressParts.join(", ");
860
+ const mapsUrl = `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(fullAddress)}`;
861
+ window.open(mapsUrl, "_blank");
862
862
  };
863
863
  const handlePrimaryClick = () => {
864
864
  if (business.primaryCtaUrl) {