import PropTypes from 'prop-types';
import { LinkContainer } from 'react-router-bootstrap';
import Nav from 'react-bootstrap/Nav';

function NavLink(props) {
  const { to, content, ...otherProps } = props;
  return (
    <LinkContainer to={to}>
      <Nav.Link {...otherProps}>{content}</Nav.Link>
    </LinkContainer>
  );
}

NavLink.propTypes = {
  to: PropTypes.string.isRequired,
  content: PropTypes.string
};

export default NavLink;
