import { Button, Card } from 'reactstrap'; import React from 'react'; import PropTypes from 'prop-types'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faArrowLeft } from '@fortawesome/free-solid-svg-icons'; import ShortUrlVisitsCount from '../short-urls/helpers/ShortUrlVisitsCount'; import { shortUrlType } from '../short-urls/reducers/shortUrlsList'; import { VisitType } from './types'; const propTypes = { visits: PropTypes.arrayOf(VisitType).isRequired, goBack: PropTypes.func.isRequired, title: PropTypes.node.isRequired, children: PropTypes.node, shortUrl: shortUrlType, }; const VisitsHeader = ({ visits, goBack, shortUrl, children, title }) => (

{title} Visits:{' '}

{title}

{children &&
{children}
}
); VisitsHeader.propTypes = propTypes; export default VisitsHeader;