import React,{ Component } from "react"; import {Tooltip} from 'antd'; import { qNameArray } from './common' import {QuillForEditor, MarkdownToHtml} from 'educoder'; class QestionDisplayHeader extends Component{ constructor(props){ super(props); this.state = { } } componentDidMount = () => { } render() { let { question_title, question_score, question_type, question_id, index, displayCount, topRight, showActionButton, exerciseIsPublish } = this.props; // const isAdmin = this.props.isAdmin() // const courseId=this.props.match.params.coursesId; // const isEdit = this.isEdit // const qNumber = `question_${index}`; const qName = qNameArray[question_type] console.log(this.props) return(
{index+1}、{qName} ({question_score}分)
{ topRight } { showActionButton != false && {!exerciseIsPublish && this.props.onQestionDelete(question_id)}> } {index === 0 ? "" : this.props.onSortUp(index, question_id)}> } {index === displayCount - 1 ? "" : this.props.onSortDown(index, question_id)}> } {!exerciseIsPublish && this.props.addQuestion(question_id, question_type)}> } this.props.editQestion(index)}> }
{ question_title && !this.props.exercise||this.props.exercise&&this.props.exercise.is_md||this.props.question_type===6?: //
}
) } } // RouteHOC() export default (QestionDisplayHeader);