починил добавление и удаление ответа на задание
This commit is contained in:
parent
d57f2de2da
commit
45a4f278ca
@ -183,17 +183,17 @@ const ViewTaskModal = () => {
|
||||
>
|
||||
<div style={{marginBottom: 16}}>
|
||||
<Text strong>Ответ:</Text>
|
||||
<Paragraph
|
||||
<div
|
||||
style={{
|
||||
background: "#f9f9f9",
|
||||
padding: 12,
|
||||
padding: 16,
|
||||
borderRadius: 8,
|
||||
margin: "8px 0",
|
||||
whiteSpace: "pre-wrap",
|
||||
margin: "12px 0",
|
||||
border: "1px solid #f0f0f0",
|
||||
minHeight: 60,
|
||||
}}
|
||||
>
|
||||
{solution.answer_text}
|
||||
</Paragraph>
|
||||
dangerouslySetInnerHTML={{__html: solution.answer_text || "<em>Текст ответа отсутствует</em>"}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{solution.files && solution.files.length > 0 ? (
|
||||
|
||||
@ -103,7 +103,7 @@ const useViewTaskModal = () => {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setDraftFiles([]);
|
||||
notification.success({
|
||||
title: "Успех",
|
||||
description: "Задание успешно создано!",
|
||||
@ -114,6 +114,7 @@ const useViewTaskModal = () => {
|
||||
editorRef.current.value = "";
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
notification.error({
|
||||
title: "Ошибка",
|
||||
description: error?.data?.detail || "Не удалось создать задание",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user