diff --git a/src/servers/Overview.tsx b/src/servers/Overview.tsx
index 84614b2e..99311133 100644
--- a/src/servers/Overview.tsx
+++ b/src/servers/Overview.tsx
@@ -55,14 +55,7 @@ export const Overview = (
Visits
-
-
- {loadingVisits ? 'Loading...' : prettify(visitsCount)}
-
-
- Shlink 2.2 is needed
-
-
+ {loadingVisits ? 'Loading...' : prettify(visitsCount)}
diff --git a/src/tags/TagCard.tsx b/src/tags/TagCard.tsx
index 6bad3281..e3cd220e 100644
--- a/src/tags/TagCard.tsx
+++ b/src/tags/TagCard.tsx
@@ -5,7 +5,6 @@ import { FC, useEffect, useRef } from 'react';
import { Link } from 'react-router-dom';
import { prettify } from '../utils/helpers/numbers';
import { useToggle } from '../utils/helpers/hooks';
-import { Versions } from '../utils/helpers/version';
import ColorGenerator from '../utils/services/ColorGenerator';
import { isServerWithId, SelectedServer } from '../servers/data';
import TagBullet from './helpers/TagBullet';
@@ -25,16 +24,13 @@ const isTruncated = (el: HTMLElement | undefined): boolean => !!el && el.scrollW
const TagCard = (
DeleteTagConfirmModal: FC,
EditTagModal: FC,
- ForServerVersion: FC,
colorGenerator: ColorGenerator,
) => ({ tag, tagStats, selectedServer, displayed, toggle }: TagCardProps) => {
const [ isDeleteModalOpen, toggleDelete ] = useToggle();
const [ isEditModalOpen, toggleEdit ] = useToggle();
const [ hasTitle,, displayTitle ] = useToggle();
const titleRef = useRef();
-
const serverId = isServerWithId(selectedServer) ? selectedServer.id : '';
- const shortUrlsLink = `/server/${serverId}/list-short-urls/1?tag=${encodeURIComponent(tag)}`;
useEffect(() => {
if (isTruncated(titleRef.current)) {
@@ -59,12 +55,7 @@ const TagCard = (
}}
>
-
- {tag}
-
-
- {tag}
-
+ {tag}
@@ -72,7 +63,7 @@ const TagCard = (
Short URLs
diff --git a/src/tags/services/provideServices.ts b/src/tags/services/provideServices.ts
index ac1753dc..1e3e8d39 100644
--- a/src/tags/services/provideServices.ts
+++ b/src/tags/services/provideServices.ts
@@ -18,14 +18,7 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator) => {
bottle.serviceFactory('TagsSelector', TagsSelector, 'ColorGenerator');
bottle.decorator('TagsSelector', connect([ 'tagsList', 'settings' ], [ 'listTags' ]));
- bottle.serviceFactory(
- 'TagCard',
- TagCard,
- 'DeleteTagConfirmModal',
- 'EditTagModal',
- 'ForServerVersion',
- 'ColorGenerator',
- );
+ bottle.serviceFactory('TagCard', TagCard, 'DeleteTagConfirmModal', 'EditTagModal', 'ColorGenerator');
bottle.serviceFactory('DeleteTagConfirmModal', () => DeleteTagConfirmModal);
bottle.decorator('DeleteTagConfirmModal', connect([ 'tagDelete' ], [ 'deleteTag', 'tagDeleted' ]));
diff --git a/test/servers/Overview.test.tsx b/test/servers/Overview.test.tsx
index 3b29b3e4..14cc85b1 100644
--- a/test/servers/Overview.test.tsx
+++ b/test/servers/Overview.test.tsx
@@ -64,13 +64,6 @@ describe('', () => {
expect(cards.at(3).html()).toContain(prettify(3));
});
- it('displays warning in first card for old shlink versions', () => {
- const wrapper = createWrapper();
- const firstCard = wrapper.find(CardText).first();
-
- expect(firstCard.html()).toContain('Shlink 2.2 is needed');
- });
-
it('nests complex components', () => {
const wrapper = createWrapper();
diff --git a/test/tags/TagCard.test.tsx b/test/tags/TagCard.test.tsx
index db1dce18..8bdd6c6c 100644
--- a/test/tags/TagCard.test.tsx
+++ b/test/tags/TagCard.test.tsx
@@ -14,7 +14,7 @@ describe('', () => {
};
const DeleteTagConfirmModal = jest.fn();
const EditTagModal = jest.fn();
- const TagCard = createTagCard(DeleteTagConfirmModal, EditTagModal, () => null, Mock.all());
+ const TagCard = createTagCard(DeleteTagConfirmModal, EditTagModal, Mock.all());
const createWrapper = (tag = 'ssr') => {
wrapper = shallow(
', () => {
it('shows expected tag stats', () => {
const links = wrapper.find(Link);
- expect(links.at(1).prop('to')).toEqual('/server/1/list-short-urls/1?tag=ssr');
- expect(links.at(1).text()).toContain('48');
- expect(links.at(2).prop('to')).toEqual('/server/1/tag/ssr/visits');
- expect(links.at(2).text()).toContain('23,257');
+ expect(links).toHaveLength(2);
+ expect(links.at(0).prop('to')).toEqual('/server/1/list-short-urls/1?tag=ssr');
+ expect(links.at(0).text()).toContain('48');
+ expect(links.at(1).prop('to')).toEqual('/server/1/tag/ssr/visits');
+ expect(links.at(1).text()).toContain('23,257');
});
});