import React, { Component } from 'react'; import { BrowserRouter as Router, Route, Link } from "react-router-dom"; class TPMNav extends Component { render() { const { user, match, shixun, secret_repository } = this.props; let isAdminOrCreator = false; if (user) { isAdminOrCreator = user.admin || user.manager } const shixunId = match.params.shixunId; // const challengesPath = `/shixuns/${shixunId}/challenges`; // console.log(this.props.propaedeutics) const challengesPath = `/shixuns/${shixunId}/challenges`; // console.log(match.path) return (
任务 { this.props.propaedeutics===undefined?"":this.props.propaedeutics===false?"":背景知识 } { this.props.identity >4||this.props.identity===undefined ?"":版本库} {this.props.identity >4||this.props.identity===undefined ?"": secret_repository && 私密版本库} 合作者 评论 排行榜 {this.props.identity >2||this.props.identity===undefined?"":审核情况} 4||this.props.identity===undefined ? "none" : 'block'}} >配置
); } } export default TPMNav;