404、403等页面隐藏侧边栏
This commit is contained in:
parent
df7fd1cf21
commit
cbb1368f15
|
@ -354,19 +354,22 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
}
|
||||
|
||||
hideNavPath = (path) => {
|
||||
const hidePath = ['/statistics', '/projects', '/notice', '/organizes', '']
|
||||
const hideUserPath = ['/statistics', '/projects', '/notice', '/organizes', '']
|
||||
const hidePath = ['/nopage', '/403', '/500', '/organize/new', '/settings/profile']
|
||||
let hide = false
|
||||
const {current_user} = this.state;
|
||||
hidePath.forEach(e => {
|
||||
hideUserPath.forEach(e => {
|
||||
if (path === `/${current_user && current_user.login}${e}`) {
|
||||
hide = true
|
||||
}
|
||||
})
|
||||
hidePath.forEach(e => {
|
||||
if (path === e) {
|
||||
hide = true
|
||||
}
|
||||
})
|
||||
// 组织页不要
|
||||
if (this.props.pathType === 'Organization') hide = true
|
||||
if (path === `/organize/new`) hide = true
|
||||
// 设置页不要
|
||||
if (path === `/settings/profile`) hide = true
|
||||
return hide
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue