[WEB-738] chore: conditionally render projects in the dropdown (#3952)

* chore: show authorized projects in the dropdown

* refactor: command palette logic

* chore: add helper function to check for project role

* fix: add preventDefault for shortcuts
This commit is contained in:
Aaryan Khandelwal 2024-03-15 17:44:01 +05:30 committed by GitHub
parent 5244ba72c9
commit 861a1c4132
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 179 additions and 101 deletions

View file

@ -6,6 +6,7 @@ import { DateRangeDropdown, ProjectDropdown } from "components/dropdowns";
// ui
// helpers
import { renderFormattedPayloadDate } from "helpers/date-time.helper";
import { shouldRenderProject } from "helpers/project.helper";
// types
import { ICycle } from "@plane/types";
@ -66,6 +67,7 @@ export const CycleForm: React.FC<Props> = (props) => {
setActiveProject(val);
}}
buttonVariant="background-with-text"
renderCondition={(project) => shouldRenderProject(project)}
tabIndex={7}
/>
)}