"use client"; import { CalendarCheck2, Signal } from "lucide-react"; // ui import { DoubleCircleIcon, StateGroupIcon, TOAST_TYPE, setToast } from "@plane/ui"; // components import { Icon } from "@/components/ui"; // constants import { issuePriorityFilter } from "@/constants/issue"; // helpers import { cn } from "@/helpers/common.helper"; import { renderFormattedDate } from "@/helpers/date-time.helper"; import { shouldHighlightIssueDueDate } from "@/helpers/issue.helper"; import { copyTextToClipboard, addSpaceIfCamelCase } from "@/helpers/string.helper"; // types import { IIssue, IPeekMode } from "@/types/issue"; type Props = { issueDetails: IIssue; mode?: IPeekMode; }; export const PeekOverviewIssueProperties: React.FC = ({ issueDetails, mode }) => { const state = issueDetails.state_detail; const priority = issueDetails.priority ? issuePriorityFilter(issueDetails.priority) : null; const handleCopyLink = () => { const urlToCopy = window.location.href; copyTextToClipboard(urlToCopy).then(() => { setToast({ type: TOAST_TYPE.INFO, title: "Link copied!", message: "Issue link copied to clipboard", }); }); }; return (
{mode === "full" && (
{issueDetails.project_detail.identifier}-{issueDetails.sequence_id}
)}
State
{addSpaceIfCamelCase(state?.name ?? "")}
Priority
{priority && ( )} {priority?.title ?? "None"}
Due date
{issueDetails.target_date ? (
{renderFormattedDate(issueDetails.target_date)}
) : ( Empty )}
); };