import { useRouter } from "next/router"; import Link from "next/link"; import { observer } from "mobx-react-lite"; import { GanttChart, LayoutGrid, List, Plus } from "lucide-react"; // mobx store import { useMobxStore } from "lib/mobx/store-provider"; // hooks import useLocalStorage from "hooks/use-local-storage"; // ui import { Breadcrumbs, BreadcrumbItem, Button, Tooltip } from "@plane/ui"; // helper import { replaceUnderscoreIfSnakeCase, truncateText } from "helpers/string.helper"; const moduleViewOptions: { type: "list" | "grid" | "gantt_chart"; icon: any }[] = [ { type: "list", icon: List, }, { type: "grid", icon: LayoutGrid, }, { type: "gantt_chart", icon: GanttChart, }, ]; export const ModulesListHeader: React.FC = observer(() => { // router const router = useRouter(); const { workspaceSlug, projectId } = router.query; const { project: projectStore } = useMobxStore(); const projectDetails = projectId ? projectStore.project_details[projectId.toString()] : undefined; const { storedValue: modulesView, setValue: setModulesView } = useLocalStorage("modules_view", "grid"); return (
router.back()}>

Projects

} />
{moduleViewOptions.map((option) => ( {replaceUnderscoreIfSnakeCase(option.type)} Layout} position="bottom" > ))}
); });