2023-09-01 11:12:30 +00:00
|
|
|
import { IssueReactions } from "components/issues/peek-overview";
|
2023-10-13 06:35:49 +00:00
|
|
|
import { RichReadOnlyEditor } from "@plane/rich-text-editor";
|
2023-09-01 11:12:30 +00:00
|
|
|
// types
|
|
|
|
import { IIssue } from "types/issue";
|
2023-11-06 15:12:24 +00:00
|
|
|
import useEditorSuggestions from "hooks/use-editor-suggestions";
|
2023-09-01 11:12:30 +00:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
issueDetails: IIssue;
|
|
|
|
};
|
|
|
|
|
2023-11-06 15:12:24 +00:00
|
|
|
export const PeekOverviewIssueDetails: React.FC<Props> = ({ issueDetails }) => {
|
|
|
|
const mentionConfig = useEditorSuggestions();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="space-y-2">
|
2024-02-08 12:53:13 +00:00
|
|
|
<h6 className="font-medium text-neutral-text-medium">
|
2023-11-06 15:12:24 +00:00
|
|
|
{issueDetails.project_detail.identifier}-{issueDetails.sequence_id}
|
|
|
|
</h6>
|
|
|
|
<h4 className="break-words text-2xl font-semibold">{issueDetails.name}</h4>
|
|
|
|
{issueDetails.description_html !== "" && issueDetails.description_html !== "<p></p>" && (
|
|
|
|
<RichReadOnlyEditor
|
2023-11-08 15:01:46 +00:00
|
|
|
value={
|
|
|
|
!issueDetails.description_html ||
|
2023-11-06 15:12:24 +00:00
|
|
|
issueDetails.description_html === "" ||
|
|
|
|
(typeof issueDetails.description_html === "object" &&
|
|
|
|
Object.keys(issueDetails.description_html).length === 0)
|
2023-11-08 15:01:46 +00:00
|
|
|
? "<p></p>"
|
|
|
|
: issueDetails.description_html
|
|
|
|
}
|
|
|
|
customClassName="p-3 min-h-[50px] shadow-sm"
|
|
|
|
mentionHighlights={mentionConfig.mentionHighlights}
|
|
|
|
/>
|
2023-11-06 15:12:24 +00:00
|
|
|
)}
|
|
|
|
<IssueReactions />
|
|
|
|
</div>
|
2023-11-08 15:01:46 +00:00
|
|
|
);
|
2023-11-06 15:12:24 +00:00
|
|
|
};
|