import { FC, RefObject } from "react"; import { observer } from "mobx-react"; import { EditorRefApi } from "@plane/rich-text-editor"; import { TIssue } from "@plane/types"; import { Loader } from "@plane/ui"; // components import { RichTextEditor } from "@/components/editor/rich-text-editor/rich-text-editor"; // hooks import { useProjectInbox } from "@/hooks/store"; type TInboxIssueDescription = { workspaceSlug: string; projectId: string; workspaceId: string; data: Partial; handleData: (issueKey: keyof Partial, issueValue: Partial[keyof Partial]) => void; editorRef: RefObject; }; // TODO: have to implement GPT Assistance export const InboxIssueDescription: FC = observer((props) => { const { workspaceSlug, projectId, workspaceId, data, handleData, editorRef } = props; // hooks const { loader } = useProjectInbox(); if (loader === "issue-loading") return ( ); return (

" : data?.description_html} ref={editorRef} workspaceSlug={workspaceSlug} workspaceId={workspaceId} projectId={projectId} dragDropEnabled={false} onChange={(_description: object, description_html: string) => { handleData("description_html", description_html); }} />
); });