import { FC } from "react"; import Link from "next/link"; import { observer } from "mobx-react-lite"; // hooks import { useView } from "hooks/store"; // ui import { PhotoFilterIcon } from "@plane/ui"; // types import { TViewTypes } from "@plane/types"; type TViewItem = { workspaceSlug: string; projectId: string | undefined; viewId: string | undefined; viewType: TViewTypes; viewItemId: string; }; export const ViewItem: FC = observer((props) => { const { workspaceSlug, projectId, viewId, viewType, viewItemId } = props; // hooks const viewStore = useView(workspaceSlug, projectId, viewType); const view = viewStore?.viewById(viewItemId); if (!view) return <>; return (
viewItemId === viewId && e.preventDefault()} >
{view?.name}
); });