import { useRouter } from "next/router"; // components import { ListProperties } from "./properties"; // ui import { Spinner, Tooltip } from "@plane/ui"; // types import { IIssue, IIssueDisplayProperties } from "types"; import { EIssueActions } from "../types"; interface IssueBlockProps { columnId: string; issue: IIssue; handleIssues: (issue: IIssue, action: EIssueActions) => void; quickActions: (group_by: string | null, issue: IIssue) => React.ReactNode; displayProperties: IIssueDisplayProperties | undefined; canEditProperties: (projectId: string | undefined) => boolean; } export const IssueBlock: React.FC = (props) => { const { columnId, issue, handleIssues, quickActions, displayProperties, canEditProperties } = props; // router const router = useRouter(); const updateIssue = (group_by: string | null, issueToUpdate: IIssue) => { handleIssues(issueToUpdate, EIssueActions.UPDATE); }; const handleIssuePeekOverview = (event: React.MouseEvent) => { const { query } = router; if (event.ctrlKey || event.metaKey) { const issueUrl = `/${issue.workspace_detail.slug}/projects/${issue.project_detail.id}/issues/${issue?.id}`; window.open(issueUrl, "_blank"); // Open link in a new tab } else { router.push({ pathname: router.pathname, query: { ...query, peekIssueId: issue?.id, peekProjectId: issue?.project }, }); } }; const canEditIssueProperties = canEditProperties(issue.project); return ( <> ); };