plane/web/components/core/views/gantt-chart-view/index.tsx

31 lines
939 B
TypeScript
Raw Normal View History

import { useRouter } from "next/router";
// components
import { CycleIssuesGanttChartView } from "components/cycles";
2023-07-23 16:44:41 +00:00
import { IssueGanttChartView } from "components/issues";
import { ModuleIssuesGanttChartView } from "components/modules";
import { ViewIssuesGanttChartView } from "components/views";
type Props = {
disableUserActions: boolean;
};
export const GanttChartView: React.FC<Props> = ({ disableUserActions }) => {
const router = useRouter();
const { cycleId, moduleId, viewId } = router.query;
return (
<>
{cycleId ? (
<CycleIssuesGanttChartView disableUserActions={disableUserActions} />
) : moduleId ? (
<ModuleIssuesGanttChartView disableUserActions={disableUserActions} />
) : viewId ? (
<ViewIssuesGanttChartView disableUserActions={disableUserActions} />
) : (
<IssueGanttChartView disableUserActions={disableUserActions} />
)}
</>
);
};