2024-03-18 07:21:19 +00:00
|
|
|
import React from "react";
|
|
|
|
// components
|
2024-04-30 13:29:07 +00:00
|
|
|
import { TIssueMap } from "@plane/types";
|
2024-03-19 14:38:35 +00:00
|
|
|
import { CalendarIssueBlock } from "@/components/issues";
|
2024-04-30 13:29:07 +00:00
|
|
|
import { TRenderQuickActions } from "../list/list-view-types";
|
2024-03-19 14:38:35 +00:00
|
|
|
// types
|
2024-03-18 07:21:19 +00:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
issues: TIssueMap | undefined;
|
|
|
|
issueId: string;
|
2024-04-30 13:29:07 +00:00
|
|
|
quickActions: TRenderQuickActions;
|
2024-03-18 07:21:19 +00:00
|
|
|
isDragging?: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const CalendarIssueBlockRoot: React.FC<Props> = (props) => {
|
|
|
|
const { issues, issueId, quickActions, isDragging } = props;
|
|
|
|
|
|
|
|
if (!issues?.[issueId]) return null;
|
|
|
|
|
|
|
|
const issue = issues?.[issueId];
|
|
|
|
|
|
|
|
return <CalendarIssueBlock isDragging={isDragging} issue={issue} quickActions={quickActions} />;
|
|
|
|
};
|