diff --git a/public/react/src/modules/developer/DeveloperHome.js b/public/react/src/modules/developer/DeveloperHome.js index 178e13ef5..6ca297f80 100644 --- a/public/react/src/modules/developer/DeveloperHome.js +++ b/public/react/src/modules/developer/DeveloperHome.js @@ -421,6 +421,7 @@ class DeveloperHome extends React.PureComponent { // const { testReducer, handleClick } = this.props; const { ojListReducer: {hacks_list, top_data, hacks_count}, + user, pagination } = this.props; const {passed_count = 0, simple_count = 0, medium_count = 0, diff_count = 0} = top_data; @@ -443,7 +444,11 @@ class DeveloperHome extends React.PureComponent { >{ctx} )}); }; - + // console.log('=====>>>>>>>>>.', this.props); + + const newBtnStyle = user && (user.admin || (user.is_teacher && user.professional_certification) || user.business) + ? { display: 'block'} + : { display: 'none'}; return (
@@ -457,7 +462,8 @@ class DeveloperHome extends React.PureComponent {
-
diff --git a/public/react/src/modules/developer/studentStudy/index.js b/public/react/src/modules/developer/studentStudy/index.js index e218092a0..91ad6778f 100644 --- a/public/react/src/modules/developer/studentStudy/index.js +++ b/public/react/src/modules/developer/studentStudy/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-23 10:53:19 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-10 19:16:18 + * @LastEditTime: 2019-12-11 17:35:49 */ import './index.scss'; import React, { useEffect } from 'react'; @@ -70,7 +70,7 @@ const StudentStudy = (props) => {
{/* to={`/problems/${_hack_id}/edit`} */} - + 编辑 {/* to="/problems" */}