feat(task): task detail
This commit is contained in:
@@ -76,6 +76,7 @@ const RightDescTools = ({ taskDetail }: ComponentProps) => {
|
||||
|
||||
useEffect(() => {
|
||||
handleFormUpdate()
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [form.values])
|
||||
|
||||
useEffect(() => {
|
||||
@@ -103,6 +104,7 @@ const RightDescTools = ({ taskDetail }: ComponentProps) => {
|
||||
setTimeout(() => {
|
||||
isUpdatingFromStore.current = false
|
||||
}, 0)
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [activeImage])
|
||||
|
||||
useEffect(() => {
|
||||
@@ -128,6 +130,7 @@ const RightDescTools = ({ taskDetail }: ComponentProps) => {
|
||||
isUpdatingFromStore.current = false
|
||||
}, 0)
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [updateDescDataFlag])
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,25 +1,21 @@
|
||||
"use client"
|
||||
|
||||
import { Task } from "../api/task/typing"
|
||||
import EditorContainer, { splitWord } from "./EditorContainer"
|
||||
import { usePermissionStore } from "../store/auth"
|
||||
import CustomModal from "./CustomModal"
|
||||
import { IconEdit } from "@tabler/icons-react"
|
||||
import {
|
||||
Button,
|
||||
Accordion,
|
||||
TextInput,
|
||||
ActionIcon,
|
||||
Box,
|
||||
Button,
|
||||
Flex,
|
||||
Group,
|
||||
NumberInput,
|
||||
Radio,
|
||||
Tooltip,
|
||||
Box,
|
||||
Flex,
|
||||
Stack,
|
||||
Text,
|
||||
ActionIcon,
|
||||
Group,
|
||||
TextInput,
|
||||
Tooltip,
|
||||
} from "@mantine/core"
|
||||
import { useForm } from "@mantine/form"
|
||||
import { IconEdit } from "@tabler/icons-react"
|
||||
import dayjs from "dayjs"
|
||||
import parse from "html-react-parser"
|
||||
import { ArrowUpIcon, ArrowUpToLineIcon } from "lucide-react"
|
||||
@@ -31,11 +27,15 @@ import {
|
||||
useMemo,
|
||||
useState,
|
||||
} from "react"
|
||||
import { getWrongWordList } from "../api/scheme"
|
||||
import { Task } from "../api/task/typing"
|
||||
import { useKeyEventStore } from "../store"
|
||||
import { usePermissionStore } from "../store/auth"
|
||||
import { useBottomToolsStore } from "../useBottomToolsStore"
|
||||
import { useDescToolsStore } from "../useDescToolsStore"
|
||||
import { useTopToolsStore } from "../useTopToolsStore"
|
||||
import { getWrongWordList } from "../api/scheme"
|
||||
import CustomModal from "./CustomModal"
|
||||
import EditorContainer, { splitWord } from "./EditorContainer"
|
||||
|
||||
interface ComponentProps {
|
||||
taskDetail?: Task.DataProps
|
||||
@@ -86,6 +86,7 @@ const RightQAContent = forwardRef(
|
||||
|
||||
const counts = useMemo(() => {
|
||||
return countAllTurnsAndQaNumber(activeImage)
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [activeImage, qaData, updateDescDataFlag, countAllTurnsAndQaNumber])
|
||||
|
||||
const [open, setOpen] = useState({
|
||||
@@ -275,7 +276,8 @@ const RightQAContent = forwardRef(
|
||||
qaData.set(currentImg, newQaData)
|
||||
setQaData(new Map(qaData)) // Force update
|
||||
updateFlag(true)
|
||||
}, [selectedQuestion, form, qaData, setQaData, updateFlag])
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [selectedQuestion, qaData, setQaData, updateFlag])
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
checkWrongWords,
|
||||
|
||||
Reference in New Issue
Block a user