import React from "react"; interface SecondaryButtonProps { text: string; targetId: string; // ← NEW: pass the section ID className?: string; } const SecondaryButton: React.FC = ({ text, targetId, className = "", }) => { const handleScroll = (e: React.MouseEvent) => { e.preventDefault(); const section = document.getElementById(targetId); if (section) { const yOffset = -80; const y = section.getBoundingClientRect().top + window.pageYOffset + yOffset; window.scrollTo({ top: y, behavior: "smooth" }); } }; return ( {text} ); }; export default SecondaryButton;