forked from github/plane
[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,6 +282,7 @@ export const CommandModal: React.FC = observer(() => {
|
|||||||
setSearchTerm={(newSearchTerm) => setSearchTerm(newSearchTerm)}
|
setSearchTerm={(newSearchTerm) => setSearchTerm(newSearchTerm)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{workspaceSlug && workspaceProjectIds && workspaceProjectIds.length > 0 && (
|
||||||
<Command.Group heading="Issue">
|
<Command.Group heading="Issue">
|
||||||
<Command.Item
|
<Command.Item
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
@ -298,6 +299,7 @@ export const CommandModal: React.FC = observer(() => {
|
|||||||
<kbd>C</kbd>
|
<kbd>C</kbd>
|
||||||
</Command.Item>
|
</Command.Item>
|
||||||
</Command.Group>
|
</Command.Group>
|
||||||
|
)}
|
||||||
|
|
||||||
{workspaceSlug && (
|
{workspaceSlug && (
|
||||||
<Command.Group heading="Project">
|
<Command.Group heading="Project">
|
||||||
|
Loading…
Reference in New Issue
Block a user