updated
This commit is contained in:
parent
60ac644fc0
commit
011df68509
|
@ -19,7 +19,7 @@ import {
|
|||
} from "@chakra-ui/react"
|
||||
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query"
|
||||
import { type SubmitHandler, useForm, UseFormRegisterReturn } from "react-hook-form"
|
||||
import { type SubmitHandler, useForm } from "react-hook-form"
|
||||
import { type ApiError, type AboutUsCreate, AboutUsService } from "../../client"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
import { handleError } from "../../utils"
|
||||
|
|
|
@ -101,7 +101,7 @@ const EditAboutUs = ({ aboutUs, isOpen, onClose }: EditAboutUsProps) => {
|
|||
}
|
||||
return EditorState.createEmpty();
|
||||
});
|
||||
const [content, setContent] = useState<string>(aboutUs.description);
|
||||
// const [content, setContent] = useState<string>(aboutUs.description);
|
||||
|
||||
// const validateFiles = (value: File) => {
|
||||
// if (typeof value === 'string') return true;
|
||||
|
@ -189,7 +189,7 @@ const EditAboutUs = ({ aboutUs, isOpen, onClose }: EditAboutUsProps) => {
|
|||
onEditorStateChange={newState => {
|
||||
setEditorState(newState);
|
||||
const newContent = draftToHtml(convertToRaw(newState.getCurrentContent()));
|
||||
setContent(newContent);
|
||||
//setContent(newContent);
|
||||
reset({
|
||||
description: newContent,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue