mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-02 14:23:42 +00:00
fix active bug in navbar
This commit is contained in:
parent
cf36d9eb52
commit
db19b45c0d
@ -29,6 +29,8 @@ const tabs = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default class TabsOptions extends Component {
|
export default class TabsOptions extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
@ -62,7 +64,8 @@ export default class TabsOptions extends Component {
|
|||||||
{
|
{
|
||||||
tabs.map((object, i) => {
|
tabs.map((object, i) => {
|
||||||
return (
|
return (
|
||||||
<li className='nav-item' key={i} onClick={this.tabClick(i)}>
|
<li className={`nav-item ${(window.location.pathname === object.link || window.location.pathname.substring(1) === object.link) ? 'active': ''}`}
|
||||||
|
key={i} onClick={this.tabClick(i)}>
|
||||||
<Link to={object.link} key={i}
|
<Link to={object.link} key={i}
|
||||||
aria-label={`nav item: ${translate(object.name)}`}>
|
aria-label={`nav item: ${translate(object.name)}`}>
|
||||||
{translate(object.name)}
|
{translate(object.name)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user