'use client'

function scrollToSearch() {
  const el = document.getElementById('search-section')
  if (el) window.scrollTo({ top: el.offsetTop - 57, behavior: 'smooth' })
}

export default function HeroScrollButton({
  children,
  className,
}: {
  children: React.ReactNode
  className?: string
}) {
  return (
    <button onClick={scrollToSearch} className={className}>
      {children}
    </button>
  )
}
