{"size": 304, "ext": "js", "max_stars_repo_path": "components/hlink.js", "max_stars_repo_name": "alienblogger/alienblogger.github.io", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "components/hlink.js", "max_issues_repo_name": "alienblogger/alienblogger.github.io", "max_issues_repo_issues_event_min_datetime": "2021-06-28T20:53:07.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-29T16:37:50.000Z", "max_forks_repo_path": "components/hlink.js", "max_forks_repo_name": "alienblogger/alienblogger.github.io", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 12, "max_forks_count": null, "avg_line_length": 19.0, "max_line_length": 73, "alphanum_fraction": 0.5657894737}
import Link from 'next/link'

const HLink = ({ link, children }) => {
  const isHttps = link.indexOf('http') > -1 || link.indexOf('https') > -1
  if (isHttps) {
    return <a href={link}>{children}</a>
  }
  return (
    <Link href={link}>
      <a>{children}</a>
    </Link>
  )
}

export default HLink
