Change NewHeader active

This commit is contained in:
sylor_huang@126.com 2020-10-16 17:12:28 +08:00
parent 67ccc2ebe5
commit 107b6ed95e
2 changed files with 4 additions and 12 deletions

View File

@ -12,7 +12,7 @@
color: #ccc;
}
}
& > a:last-child {w
& > a:last-child {
border-bottom: none;
}
}

View File

@ -575,19 +575,11 @@ class NewHeader extends Component {
matchpaths = (url) => {
const { match } = this.props;
if(url){
if (url === '/forums' && match.path === '/forums') {
if (url.indexOf('forums') > -1 && match.path.indexOf('forums') > -1) {
return true
} else if (url.startsWith('/projects') && match.path.startsWith('/projects')) {
} else if (url.indexOf('projects') > -1 && match.path.indexOf('projects') > -1) {
return true
} else if (url.startsWith('/paths') && match.path.startsWith('/paths')) {
return true
} else if (url.startsWith('/courses') && match.path.startsWith('/courses')) {
return true
} else if (url.startsWith('/competitions') && match.path.startsWith('/competitions')) {
return true
} else if (url.startsWith('/statistics') && match.path.startsWith('/statistics')) {
return true
} else if (url.startsWith('/users') && match.path.startsWith('/users')) {
} else if (url.indexOf('users') > -1 && match.path.indexOf('users') > -1) {
return true
} else {
return false