update style

dev_tpm_ui
tangjiang 5 years ago
parent 0754429072
commit fa7e7426aa

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-27 09:49:30 * @Date: 2019-11-27 09:49:30
* @LastEditors : tangjiang * @LastEditors : tangjiang
* @LastEditTime : 2019-12-25 14:50:37 * @LastEditTime : 2019-12-27 18:42:59
*/ */
import '../index.scss'; import '../index.scss';
import React from 'react'; import React from 'react';
@ -18,7 +18,7 @@ const {tagBackground, diffText} = CONST;
const TaskDescription = (props) => { const TaskDescription = (props) => {
const { hack = {} } = props; const { hack = {}, userInfo = {} } = props;
const {language, difficult, time_limit, username, description} = hack; const {language, difficult, time_limit, username, description} = hack;
return ( return (
<div className={'task_description_area'}> <div className={'task_description_area'}>
@ -37,7 +37,7 @@ const TaskDescription = (props) => {
</p> </p>
<p className={'header_flex'}> <p className={'header_flex'}>
<span className={'flex_label'}>出题者:</span> <span className={'flex_label'}>出题者:</span>
<Link to="/users/innov/courses" target="_blank" style={{ color: '#5091FF'}}>{username}</Link> <Link to={`/users/${userInfo.login}/courses`} target="_blank" style={{ color: '#5091FF'}}>{username}</Link>
</p> </p>
</div> </div>
<div className="task_desc_area"> <div className="task_desc_area">
@ -52,8 +52,10 @@ const TaskDescription = (props) => {
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
const { hack } = state.ojForUserReducer; const { hack } = state.ojForUserReducer;
const { userInfo } = state.userReducer;
return { return {
hack hack,
userInfo
} }
} }

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-20 16:35:46 * @Date: 2019-11-20 16:35:46
* @LastEditors : tangjiang * @LastEditors : tangjiang
* @LastEditTime : 2019-12-27 14:18:02 * @LastEditTime : 2019-12-27 18:50:22
*/ */
import types from './actionTypes'; import types from './actionTypes';
import CONST from '../../constants'; import CONST from '../../constants';
@ -297,6 +297,9 @@ export const validateOjForm = (props, type, cb) => {
type: types.SAVE_OJ_FORM_ID, type: types.SAVE_OJ_FORM_ID,
payload: identifier payload: identifier
}); });
if (paramsObj['submitType'] === 'add' && identifier) {
props.history.push(`/problems/${identifier}/edit`)
};
} }
// 保存或更新后调用start接口 // 保存或更新后调用start接口
// linkToDev(dispatch, props); // linkToDev(dispatch, props);

Loading…
Cancel
Save