Send Data on click Button in reactJs

 Send Data on click Button in reactJs


const handleOpenMap = (latitude, longitude) => {

  // Use the latitude and longitude in the URL

  const mapsUrl = `https://www.google.com/maps?q=${latitude},${longitude}`;

  window.open(mapsUrl, '_blank');

};




<a type={"link"} onClick={() => handleOpenMap(currentRow?.lat, currentRow?.long)}>
  {currentRow?.lat},{currentRow?.long}
</a>

Comments

Popular posts from this blog

2 Column unique validation in controller in Laravel

Axis Bank BBPS API Integration