[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:
parent
5244ba72c9
commit
861a1c4132
7 changed files with 179 additions and 101 deletions
|
|
@ -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}
|
||||
/>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue