mirror of https://gitee.com/answerdev/answer.git
Merge branch 'test' of git.backyard.segmentfault.com:opensource/answer into test
This commit is contained in:
commit
f651529ba1
|
@ -1222,7 +1222,7 @@ ui:
|
|||
btn_submit: Save
|
||||
not_found_props: "Required property {{ key }} not found."
|
||||
page_review:
|
||||
review: Reivew
|
||||
review: Review
|
||||
proposed: proposed
|
||||
question_edit: Question edit
|
||||
answer_edit: Answer edit
|
||||
|
|
|
@ -60,6 +60,11 @@ const Ask = () => {
|
|||
const [formData, setFormData] = useState<FormDataItem>(initFormData);
|
||||
const [checked, setCheckState] = useState(false);
|
||||
const [focusType, setForceType] = useState('');
|
||||
const resetForm = () => {
|
||||
setFormData(initFormData);
|
||||
setCheckState(false);
|
||||
setForceType('');
|
||||
};
|
||||
|
||||
const editorRef = useRef<EditorRef>({
|
||||
getHtml: () => '',
|
||||
|
@ -75,7 +80,11 @@ const Ask = () => {
|
|||
const { data: similarQuestions = { list: [] } } = useQueryQuestionByTitle(
|
||||
isEdit ? '' : formData.title.value,
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isEdit) {
|
||||
resetForm();
|
||||
}
|
||||
}, [isEdit]);
|
||||
const { data: revisions = [] } = useQueryRevisions(qid);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -3,7 +3,13 @@ import { Container, Row, Col, Alert, Stack, Button } from 'react-bootstrap';
|
|||
import { Link } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { BaseUserCard, FormatTime, Empty, DiffContent } from '@/components';
|
||||
import {
|
||||
BaseUserCard,
|
||||
FormatTime,
|
||||
Empty,
|
||||
DiffContent,
|
||||
PageTitle,
|
||||
} from '@/components';
|
||||
import { getReviewList, revisionAudit } from '@/services';
|
||||
import { pathFactory } from '@/router/pathFactory';
|
||||
import type * as Type from '@/common/interface';
|
||||
|
@ -119,6 +125,7 @@ const Index: FC = () => {
|
|||
}, []);
|
||||
return (
|
||||
<Container className="pt-2 mt-4 mb-5">
|
||||
<PageTitle title={t('review')} />
|
||||
<Row>
|
||||
<Col lg={{ span: 7, offset: 1 }}>
|
||||
<h3 className="mb-4">{t('review')}</h3>
|
||||
|
|
Loading…
Reference in New Issue