import { useRouter } from "next/router"; import { observer } from "mobx-react-lite"; // hooks import { useMobxStore } from "lib/mobx/store-provider"; import useProjectDetails from "hooks/use-project-details"; // components import { GanttChartRoot, IBlockUpdateData, renderIssueBlocksStructure } from "components/gantt-chart"; import { IssueGanttBlock, IssueGanttSidebarBlock } from "components/issues"; // types import { IIssueUnGroupedStructure } from "store/issue"; export const CycleGanttLayout: React.FC = observer(() => { const router = useRouter(); const { workspaceSlug, cycleId } = router.query; const { projectDetails } = useProjectDetails(); const { cycleIssue: cycleIssueStore, issueFilter: issueFilterStore } = useMobxStore(); const appliedDisplayFilters = issueFilterStore.userDisplayFilters; const issues = cycleIssueStore.getIssues; const updateIssue = (block: any, payload: IBlockUpdateData) => { if (!workspaceSlug || !cycleId) return; cycleIssueStore.updateGanttIssueStructure(workspaceSlug.toString(), cycleId.toString(), block, payload); }; const isAllowed = projectDetails?.member_role === 20 || projectDetails?.member_role === 15; return ( <>