import { MutableRefObject } from "react"; // ui import { Loader } from "@plane/ui"; // components import { IBlockUpdateData, IGanttBlock } from "@/components/gantt-chart/types"; import { GanttDnDHOC } from "../gantt-dnd-HOC"; import { handleOrderChange } from "../utils"; import { CyclesSidebarBlock } from "./block"; // types type Props = { title: string; blockUpdateHandler: (block: any, payload: IBlockUpdateData) => void; blocks: IGanttBlock[] | null; enableReorder: boolean; }; export const CycleGanttSidebar: React.FC = (props) => { const { blockUpdateHandler, blocks, enableReorder } = props; const handleOnDrop = ( draggingBlockId: string | undefined, droppedBlockId: string | undefined, dropAtEndOfList: boolean ) => { handleOrderChange(draggingBlockId, droppedBlockId, dropAtEndOfList, blocks, blockUpdateHandler); }; return (
{blocks ? ( blocks.map((block, index) => ( {(isDragging: boolean, dragHandleRef: MutableRefObject) => ( )} )) ) : ( )}
); };