|
|
|
@ -261,13 +261,9 @@ class NewHeader extends Component {
|
|
|
|
|
|
|
|
|
|
if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user===null){
|
|
|
|
|
window.location.href = "/login";
|
|
|
|
|
return
|
|
|
|
|
}else if(this.state.current_user&&this.state.current_user.login=== ""||this.state.current_user&&this.state.current_user===null){
|
|
|
|
|
window.location.href = "/login";
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(sum===1){
|
|
|
|
|
}else if(sum===1){
|
|
|
|
|
window.location.href = "/courses/new";
|
|
|
|
|
}else if(sum===2){
|
|
|
|
|
window.location.href = "/shixuns/new";
|
|
|
|
|