mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 01:20:24 +03:00
Added 'active' on Add server link
This commit is contained in:
parent
72f96a6d1d
commit
a00f59bab3
1 changed files with 8 additions and 1 deletions
|
@ -22,6 +22,9 @@ export class MainHeader extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { location } = this.props;
|
||||||
|
const createServerPath = '/server/create';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Navbar color="primary" dark fixed="top" className="main-header" expand="md">
|
<Navbar color="primary" dark fixed="top" className="main-header" expand="md">
|
||||||
<NavbarBrand tag={Link} to="/">
|
<NavbarBrand tag={Link} to="/">
|
||||||
|
@ -31,7 +34,11 @@ export class MainHeader extends React.Component {
|
||||||
<Collapse navbar isOpen={this.state.isOpen}>
|
<Collapse navbar isOpen={this.state.isOpen}>
|
||||||
<Nav navbar className="ml-auto">
|
<Nav navbar className="ml-auto">
|
||||||
<NavItem>
|
<NavItem>
|
||||||
<NavLink tag={Link} to="/server/create">
|
<NavLink
|
||||||
|
tag={Link}
|
||||||
|
to={createServerPath}
|
||||||
|
active={location.pathname === createServerPath}
|
||||||
|
>
|
||||||
<FontAwesomeIcon icon={plusIcon}/> Add server
|
<FontAwesomeIcon icon={plusIcon}/> Add server
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</NavItem>
|
</NavItem>
|
||||||
|
|
Loading…
Reference in a new issue