mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
Fixed first item on aside menu only selected when in first page
This commit is contained in:
parent
850630092a
commit
2b44d1b009
1 changed files with 2 additions and 0 deletions
|
@ -25,6 +25,7 @@ export default function AsideMenu({ selectedServer, className, showOnMobile }) {
|
||||||
const asideClass = classnames('aside-menu', className, {
|
const asideClass = classnames('aside-menu', className, {
|
||||||
'aside-menu--hidden': !showOnMobile,
|
'aside-menu--hidden': !showOnMobile,
|
||||||
});
|
});
|
||||||
|
const shortUrlsIsActive = (match, location) => location.pathname.match('/list-short-urls');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<aside className={asideClass}>
|
<aside className={asideClass}>
|
||||||
|
@ -33,6 +34,7 @@ export default function AsideMenu({ selectedServer, className, showOnMobile }) {
|
||||||
className="aside-menu__item"
|
className="aside-menu__item"
|
||||||
activeClassName="aside-menu__item--selected"
|
activeClassName="aside-menu__item--selected"
|
||||||
to={`/server/${serverId}/list-short-urls/1`}
|
to={`/server/${serverId}/list-short-urls/1`}
|
||||||
|
isActive={shortUrlsIsActive}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={listIcon} />
|
<FontAwesomeIcon icon={listIcon} />
|
||||||
<span className="aside-menu__item-text">List short URLs</span>
|
<span className="aside-menu__item-text">List short URLs</span>
|
||||||
|
|
Loading…
Reference in a new issue