// AdCard.js  
function formatNumber(x) {
    return x.toString().replace(/B(?=(d{3})+(?!d))/g, ",");
  }

<h3>${formatNumber(ad?.price)}</h3>
<p className="card-text">{ad?.address}</p>