import { useRouter } from 'next/router'

export function BackButton(): React.ReactElement {
  const router = useRouter()
  return (
    <button
      onClick={() => {
        void router.push('/')
      }}
      className="text-blue-600 hover:text-blue-700 text-sm font-medium mb-4"
    >
      ← Back to Articles
    </button>
  )
}
