import { FC, Fragment } from "react"; import { observer } from "mobx-react-lite"; import { LucideIcon, List, Kanban, Calendar, Sheet, GanttChartSquare } from "lucide-react"; // hooks import { useViewDetail } from "hooks/store"; // ui import { Tooltip } from "@plane/ui"; // types import { TViewLayouts, TViewTypes } from "@plane/types"; import { TViewOperations } from "./types"; type TViewLayoutRoot = { workspaceSlug: string; projectId: string | undefined; viewId: string; viewType: TViewTypes; viewOperations: TViewOperations; }; const LAYOUTS_DATA: { key: TViewLayouts; title: string; icon: LucideIcon }[] = [ { key: "list", title: "List Layout", icon: List }, { key: "kanban", title: "Kanban Layout", icon: Kanban }, { key: "calendar", title: "Calendar Layout", icon: Calendar }, { key: "spreadsheet", title: "Spreadsheet Layout", icon: Sheet }, { key: "gantt", title: "Gantt Chart layout", icon: GanttChartSquare }, ]; export const ViewLayoutRoot: FC = observer((props) => { const { workspaceSlug, projectId, viewId, viewType, viewOperations } = props; // hooks const viewDetailStore = useViewDetail(workspaceSlug, projectId, viewId, viewType); return (
{LAYOUTS_DATA.map((layout) => (
viewOperations.setDisplayFilters({ layout: layout.key })} >
))}
); });