{"size": 664, "ext": "js", "max_stars_repo_path": "src/components/SelectLanguage.js", "max_stars_repo_name": "jnoodle/gatsby-starter-website", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/SelectLanguage.js", "max_issues_repo_name": "jnoodle/gatsby-starter-website", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/SelectLanguage.js", "max_forks_repo_name": "jnoodle/gatsby-starter-website", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.7142857143, "max_line_length": 73, "alphanum_fraction": 0.6265060241}
import React from 'react'
import PropTypes from 'prop-types'
import Link from 'gatsby-link'
import { FormattedMessage } from 'react-intl'

// eslint-disable-next-line react/require-default-props, react/prop-types
const SelectLanguage = ({ langs }) => {
  console.log(langs)
  const links = langs.map((lang) => (
    <Link to={lang.link} key={lang.langKey}>
      <li selected={lang.selected}>
        <FormattedMessage id={'menu.selectLanguage.' + lang.langKey} />
      </li>
    </Link>
  ))

  return (
    <ul>
      <li>
        <FormattedMessage id="menu.selectLanguage" />
        <ul>{links}</ul>
      </li>
    </ul>
  )
}

export default SelectLanguage
