chromesetting
tangjiang 5 years ago
parent 531064d9e7
commit ae4a4a2f99

@ -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}</Tag>
)});
};
// console.log('=====>>>>>>>>>.', this.props);
const newBtnStyle = user && (user.admin || (user.is_teacher && user.professional_certification) || user.business)
? { display: 'block'}
: { display: 'none'};
return (
<div className="developer-list">
<div className="ant-spin-container">
@ -457,7 +462,8 @@ class DeveloperHome extends React.PureComponent {
<MultipTags type="warning" text="中等" numb={medium_count} style={{ marginRight: '20px' }}/>
<MultipTags type="error" text="困难" numb={diff_count}/>
</div>
<Button type="primary" onClick={this.handleClickNew}>新建
{/* 认证的老师, 超级管理员, 运营人员可见 */}
<Button style={ newBtnStyle } type="primary" onClick={this.handleClickNew}>新建
{/* <Link to="/problems/new">新建</Link> */}
</Button>
</div>

@ -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) => {
</div>
<div className={'study_quit'}>
{/* to={`/problems/${_hack_id}/edit`} */}
<span onClick={handleClickEditor} className="quit-btn">
<span onClick={handleClickEditor} className={`quit-btn`}>
<Icon type="form" className="quit-icon"/> 编辑
</span>
{/* to="/problems" */}

Loading…
Cancel
Save