mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
[WEB-833] chore: remove create a new issue
option from command k modal if no projects are there. (#4083)
This commit is contained in:
parent
2c510a7cb9
commit
5d4b3cea4c
@ -40,7 +40,7 @@ const issueService = new IssueService();
|
|||||||
|
|
||||||
export const CommandModal: React.FC = observer(() => {
|
export const CommandModal: React.FC = observer(() => {
|
||||||
// hooks
|
// hooks
|
||||||
const { getProjectById } = useProject();
|
const { getProjectById, workspaceProjectIds } = useProject();
|
||||||
const { isMobile } = usePlatformOS();
|
const { isMobile } = usePlatformOS();
|
||||||
// states
|
// states
|
||||||
const [placeholder, setPlaceholder] = useState("Type a command or search...");
|
const [placeholder, setPlaceholder] = useState("Type a command or search...");
|
||||||
@ -282,22 +282,24 @@ export const CommandModal: React.FC = observer(() => {
|
|||||||
setSearchTerm={(newSearchTerm) => setSearchTerm(newSearchTerm)}
|
setSearchTerm={(newSearchTerm) => setSearchTerm(newSearchTerm)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Command.Group heading="Issue">
|
{workspaceSlug && workspaceProjectIds && workspaceProjectIds.length > 0 && (
|
||||||
<Command.Item
|
<Command.Group heading="Issue">
|
||||||
onSelect={() => {
|
<Command.Item
|
||||||
closePalette();
|
onSelect={() => {
|
||||||
setTrackElement("Command Palette");
|
closePalette();
|
||||||
toggleCreateIssueModal(true);
|
setTrackElement("Command Palette");
|
||||||
}}
|
toggleCreateIssueModal(true);
|
||||||
className="focus:bg-custom-background-80"
|
}}
|
||||||
>
|
className="focus:bg-custom-background-80"
|
||||||
<div className="flex items-center gap-2 text-custom-text-200">
|
>
|
||||||
<LayersIcon className="h-3.5 w-3.5" />
|
<div className="flex items-center gap-2 text-custom-text-200">
|
||||||
Create new issue
|
<LayersIcon className="h-3.5 w-3.5" />
|
||||||
</div>
|
Create new issue
|
||||||
<kbd>C</kbd>
|
</div>
|
||||||
</Command.Item>
|
<kbd>C</kbd>
|
||||||
</Command.Group>
|
</Command.Item>
|
||||||
|
</Command.Group>
|
||||||
|
)}
|
||||||
|
|
||||||
{workspaceSlug && (
|
{workspaceSlug && (
|
||||||
<Command.Group heading="Project">
|
<Command.Group heading="Project">
|
||||||
|
Loading…
Reference in New Issue
Block a user