import { Command } from "cmdk"; import { ContrastIcon, FileText } from "lucide-react"; import { DiceIcon, PhotoFilterIcon } from "@plane/ui"; // constants import { E_COMMAND_PALETTE } from "@/constants/event-tracker"; // hooks import { useCommandPalette, useEventTracker } from "@/hooks/store"; // ui type Props = { closePalette: () => void; }; export const CommandPaletteProjectActions: React.FC = (props) => { const { closePalette } = props; // store hooks const { toggleCreateCycleModal, toggleCreateModuleModal, toggleCreatePageModal, toggleCreateViewModal } = useCommandPalette(); const { setTrackElement } = useEventTracker(); return ( <> { closePalette(); setTrackElement(E_COMMAND_PALETTE); toggleCreateCycleModal(true); }} className="focus:outline-none" >
Create new cycle
Q
{ closePalette(); setTrackElement(E_COMMAND_PALETTE); toggleCreateModuleModal(true); }} className="focus:outline-none" >
Create new module
M
{ closePalette(); setTrackElement(E_COMMAND_PALETTE); toggleCreateViewModal(true); }} className="focus:outline-none" >
Create new view
V
{ closePalette(); setTrackElement(E_COMMAND_PALETTE); toggleCreatePageModal(true); }} className="focus:outline-none" >
Create new page
D
); };