|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Github:
|
|
|
|
|
* @Date: 2019-12-04 08:36:21
|
|
|
|
|
* @LastEditors : tangjiang
|
|
|
|
|
* @LastEditTime : 2019-12-27 14:51:42
|
|
|
|
|
* @LastEditTime : 2019-12-27 21:18:39
|
|
|
|
|
*/
|
|
|
|
|
import './index.scss';
|
|
|
|
|
import React, { useState, useEffect } from 'react';
|
|
|
|
@ -60,6 +60,14 @@ function RecordDetail (props) {
|
|
|
|
|
props.history.push(`/myproblems/${identifier}`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handleEditorCode = (identifier, code) => {
|
|
|
|
|
if (identifier) {
|
|
|
|
|
console.log(code);
|
|
|
|
|
saveEditorCodeForDetail(code);
|
|
|
|
|
props.history.push(`/myproblems/${identifier}`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div className="record_detail_area">
|
|
|
|
|
<div className="record_detail_header">
|
|
|
|
@ -114,9 +122,10 @@ function RecordDetail (props) {
|
|
|
|
|
style={{ visibility: identifier ? 'visible' : 'hidden'}}
|
|
|
|
|
className={'header_btn'}
|
|
|
|
|
type="primary"
|
|
|
|
|
onClick={() => handleEditorCode(identifier, detail.code)}
|
|
|
|
|
>
|
|
|
|
|
{/* 编辑代码 */}
|
|
|
|
|
<Link to={`/myproblems/${identifier}`}>编辑代码</Link>
|
|
|
|
|
编辑代码
|
|
|
|
|
{/* <Link to={`/myproblems/${identifier}`}>编辑代码</Link> */}
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="result_code_area">
|
|
|
|
|