From fb407da3e8bb03e09be95ffd1afb7322bc6f50e6 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Wed, 18 Jul 2018 20:09:31 +0200 Subject: [PATCH] Fixed siude menu active element not being properly selected --- src/common/AsideMenu.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/AsideMenu.js b/src/common/AsideMenu.js index 1b223dbb..08808d2a 100644 --- a/src/common/AsideMenu.js +++ b/src/common/AsideMenu.js @@ -4,6 +4,11 @@ import './AsideMenu.scss'; export default function AsideMenu({ selectedServer }) { const serverId = selectedServer ? selectedServer.id : ''; + const isListShortUrlsActive = (match, { pathname }) => { + // FIXME. Should use the 'match' params, but they are not being properly resolved. Investigate + const serverIdFromPathname = pathname.split('/')[2]; + return serverIdFromPathname === serverId && pathname.indexOf('list-short-urls') !== -1; + }; return (