+
+ Created: {renderDate()}
+
+ Long URL:{' '}
+ {loading && Loading...}
+ {!loading && }
+
+
+ );
+}
+
+ShortUrlVisitsHeader.propTypes = propTypes;
diff --git a/src/visits/ShortUrlVisitsHeader.scss b/src/visits/ShortUrlVisitsHeader.scss
new file mode 100644
index 00000000..cb223b60
--- /dev/null
+++ b/src/visits/ShortUrlVisitsHeader.scss
@@ -0,0 +1,3 @@
+.short-url-visits-header__created-at {
+ cursor: default;
+}
diff --git a/src/visits/VisitsHeader.js b/src/visits/VisitsHeader.js
index 84752c1c..9c6d1c78 100644
--- a/src/visits/VisitsHeader.js
+++ b/src/visits/VisitsHeader.js
@@ -1,67 +1,41 @@
-import { Button, Card, UncontrolledTooltip } from 'reactstrap';
-import Moment from 'react-moment';
+import { Button, Card } from 'reactstrap';
import React from 'react';
import PropTypes from 'prop-types';
-import { ExternalLink } from 'react-external-link';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
import ShortUrlVisitsCount from '../short-urls/helpers/ShortUrlVisitsCount';
-import { shortUrlDetailType } from './reducers/shortUrlDetail';
-import { shortUrlVisitsType } from './reducers/shortUrlVisits';
-import './VisitsHeader.scss';
+import { shortUrlType } from '../short-urls/reducers/shortUrlsList';
+import { VisitType } from './types';
const propTypes = {
- shortUrlDetail: shortUrlDetailType.isRequired,
- shortUrlVisits: shortUrlVisitsType.isRequired,
+ visits: PropTypes.arrayOf(VisitType).isRequired,
goBack: PropTypes.func.isRequired,
+ title: PropTypes.node.isRequired,
+ children: PropTypes.node,
+ shortUrl: shortUrlType,
};
-export default function VisitsHeader({ shortUrlDetail, shortUrlVisits, goBack }) {
- const { shortUrl, loading } = shortUrlDetail;
- const { visits } = shortUrlVisits;
- const shortLink = shortUrl && shortUrl.shortUrl ? shortUrl.shortUrl : '';
- const longLink = shortUrl && shortUrl.longUrl ? shortUrl.longUrl : '';
-
- const renderDate = () => (
-