<a
href="#similar-listing-expiry"
className="btn btn-primary"
onClick={(e) => {
e.preventDefault();
const targetElement = document.getElementById('similar-listing-expiry');
if (targetElement) {
const yOffset = -100; // offset after scroll
const y = targetElement.getBoundingClientRect().top + window.pageYOffset + yOffset;
window.scrollTo({ top: y, behavior: 'smooth' });
}
}}
>
View Similar Properties
</a>