import { Command } from "cmdk"; import { ContrastIcon, FileText } from "lucide-react"; // hooks import { DiceIcon, PhotoFilterIcon } from "@plane/ui"; 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("Command palette"); toggleCreateCycleModal(true); }} className="focus:outline-none" >
Create new cycle
Q
{ closePalette(); setTrackElement("Command palette"); toggleCreateModuleModal(true); }} className="focus:outline-none" >
Create new module
M
{ closePalette(); setTrackElement("Command palette"); toggleCreateViewModal(true); }} className="focus:outline-none" >
Create new view
V
{ closePalette(); setTrackElement("Command palette"); toggleCreatePageModal({ isOpen: true }); }} className="focus:outline-none" >
Create new page
D
); };