{"size": 1175, "ext": "js", "max_stars_repo_path": "src/components/commons/Menu/index.js", "max_stars_repo_name": "omausantos/instalura-base", "max_stars_repo_stars_event_min_datetime": "2021-07-27T23:36:05.000Z", "max_stars_repo_stars_event_max_datetime": "2021-08-17T02:34:10.000Z", "max_issues_repo_path": "src/components/commons/Menu/index.js", "max_issues_repo_name": "omausantos/instalura-base", "max_issues_repo_issues_event_min_datetime": "2021-08-12T23:57:33.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-17T22:13:36.000Z", "max_forks_repo_path": "src/components/commons/Menu/index.js", "max_forks_repo_name": "omausantos/instalura-base", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": 27, "max_forks_count": null, "avg_line_length": 22.1698113208, "max_line_length": 70, "alphanum_fraction": 0.5617021277}
import React from 'react';
import PropTypes from 'prop-types';
import Logo from '../../../theme/Logo';
import Text from '../../foundation/Text';
import Button from '../Button';
import MenuWrapper from './styles/MenuWrapper';

const links = [
  {
    texto: 'Home',
    url: '/',
  },
  {
    texto: 'Perguntas frequentes',
    url: '/faq',
  },
  {
    texto: 'Sobre',
    url: '/sobre',
  },
];

export default function Menu({ onOpenModal }) {
  return (
    <MenuWrapper>
      <MenuWrapper.LeftSide>
        <Logo />
      </MenuWrapper.LeftSide>
      <MenuWrapper.CentralSide>
        {links.map((link) => (
          <li key={link.url}>
            <Text tag="a" variant="smallestException" href={link.url}>
              {link.texto}
            </Text>
          </li>
        ))}
      </MenuWrapper.CentralSide>
      <MenuWrapper.RightSide>
        <Button ghost variant="secondary.main" href="/app/login">
          Entrar
        </Button>
        <Button variant="primary.main" onClick={onOpenModal}>
          Cadastrar
        </Button>
      </MenuWrapper.RightSide>
    </MenuWrapper>
  );
}

Menu.propTypes = {
  onOpenModal: PropTypes.func.isRequired,
};
