From 09e2c69e461f20f9489cbd5767cecc38de7bd1d3 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 11 May 2020 19:40:19 +0200 Subject: [PATCH] Ensured visits by tag route does not work for old Shlink servers --- src/common/MenuLayout.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/MenuLayout.js b/src/common/MenuLayout.js index ce6e7eca..428eeb1a 100644 --- a/src/common/MenuLayout.js +++ b/src/common/MenuLayout.js @@ -8,6 +8,7 @@ import * as PropTypes from 'prop-types'; import { serverType } from '../servers/prop-types'; import { withSelectedServer } from '../servers/helpers/withSelectedServer'; import { useToggle } from '../utils/helpers/hooks'; +import { versionMatch } from '../utils/helpers/version'; import NotFound from './NotFound'; import './MenuLayout.scss'; @@ -37,6 +38,7 @@ const MenuLayout = ( return ; } + const addTagsVisitsRoute = versionMatch(selectedServer.version, { minVersion: '2.2.0' }); const burgerClasses = classNames('menu-layout__burger-icon', { 'menu-layout__burger-icon--active': sidebarVisible, }); @@ -70,7 +72,7 @@ const MenuLayout = ( - + {addTagsVisitsRoute && } List short URLs}