diff --git a/src/tags/helpers/Tag.js b/src/tags/helpers/Tag.js
index 29515af5..e2a29e9a 100644
--- a/src/tags/helpers/Tag.js
+++ b/src/tags/helpers/Tag.js
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
-import './Tag.scss';
import { colorGeneratorType } from '../../utils/services/ColorGenerator';
+import './Tag.scss';
const propTypes = {
text: PropTypes.string,
@@ -17,12 +17,12 @@ const Tag = ({
children,
clearable,
colorGenerator,
- onClick = () => {},
- onClose = () => {},
+ onClick,
+ onClose,
}) => (
{children || text}
diff --git a/src/tags/helpers/Tag.scss b/src/tags/helpers/Tag.scss
index 757abd36..a3a5ecec 100644
--- a/src/tags/helpers/Tag.scss
+++ b/src/tags/helpers/Tag.scss
@@ -1,6 +1,5 @@
.tag {
color: #fff;
- cursor: pointer;
}
.tag:not(:last-child) {
diff --git a/src/visits/TagVisits.js b/src/visits/TagVisits.js
index 70becba1..ae17aacd 100644
--- a/src/visits/TagVisits.js
+++ b/src/visits/TagVisits.js
@@ -22,7 +22,7 @@ const propTypes = {
settings: SettingsType,
};
-const TagVisits = (VisitsStats) => {
+const TagVisits = (VisitsStats, colorGenerator) => {
const TagVisitsComp = ({
history,
match,
@@ -51,7 +51,7 @@ const TagVisits = (VisitsStats) => {
return (
-
+
);
};
diff --git a/src/visits/TagVisitsHeader.js b/src/visits/TagVisitsHeader.js
index e37801ff..48c8bf3c 100644
--- a/src/visits/TagVisitsHeader.js
+++ b/src/visits/TagVisitsHeader.js
@@ -1,5 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
+import Tag from '../tags/helpers/Tag';
+import { colorGeneratorType } from '../utils/services/ColorGenerator';
import VisitsHeader from './VisitsHeader';
import { TagVisitsType } from './reducers/tagVisits';
import './ShortUrlVisitsHeader.scss';
@@ -7,15 +9,17 @@ import './ShortUrlVisitsHeader.scss';
const propTypes = {
tagVisits: TagVisitsType.isRequired,
goBack: PropTypes.func.isRequired,
+ colorGenerator: colorGeneratorType,
};
-const TagVisitsHeader = ({ tagVisits, goBack }) => {
+const TagVisitsHeader = ({ tagVisits, goBack, colorGenerator }) => {
const { visits, tag } = tagVisits;
const visitsStatsTitle = (
-
- Visits for {tag}
-
+
+ Visits for
+
+
);
return ;
diff --git a/src/visits/VisitsHeader.js b/src/visits/VisitsHeader.js
index 89225027..fa59beee 100644
--- a/src/visits/VisitsHeader.js
+++ b/src/visits/VisitsHeader.js
@@ -30,7 +30,7 @@ const VisitsHeader = ({ visits, goBack, shortUrl, children, title }) => (
-
+
{title}
diff --git a/src/visits/services/provideServices.js b/src/visits/services/provideServices.js
index 1f766785..f0701a05 100644
--- a/src/visits/services/provideServices.js
+++ b/src/visits/services/provideServices.js
@@ -19,7 +19,7 @@ const provideServices = (bottle, connect) => {
[ 'shortUrlVisits', 'shortUrlDetail', 'mercureInfo', 'settings' ],
[ 'getShortUrlVisits', 'getShortUrlDetail', 'cancelGetShortUrlVisits', 'createNewVisit', 'loadMercureInfo' ]
));
- bottle.serviceFactory('TagVisits', TagVisits, 'VisitsStats');
+ bottle.serviceFactory('TagVisits', TagVisits, 'VisitsStats', 'ColorGenerator');
bottle.decorator('TagVisits', connect(
[ 'tagVisits', 'mercureInfo', 'settings' ],
[ 'getTagVisits', 'cancelGetTagVisits', 'createNewVisit', 'loadMercureInfo' ]