{"size": 495, "ext": "js", "max_stars_repo_path": "components/shared/Link/index.js", "max_stars_repo_name": "bastienrobert/nextstart", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "components/shared/Link/index.js", "max_issues_repo_name": "bastienrobert/nextstart", "max_issues_repo_issues_event_min_datetime": "2020-04-30T01:54:48.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-13T02:13:58.000Z", "max_forks_repo_path": "components/shared/Link/index.js", "max_forks_repo_name": "bastienrobert/nextstart", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 19.0384615385, "max_line_length": 56, "alphanum_fraction": 0.6303030303}
import NextLink from 'next/link'
import classnames from 'classnames'

import css from './styles.scss'

export default function Link({
  href,
  external,
  className,
  children,
  prefetch
}) {
  const componentStyle = classnames(css.Link, className)

  return (
    <NextLink prefetch={prefetch} href={href}>
      <a
        className={componentStyle}
        target={external ? '_blank' : null}
        rel={external ? 'noopener' : null}>
        {children}
      </a>
    </NextLink>
  )
}
