File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,13 @@ import { ReactComponent as FolderIcon } from 'src/assets/icons/folder-icon.svg';
1010import { useGetWorkspacesByWidProjectsQuery } from 'src/features/api' ;
1111import { setExpressProject } from 'src/features/express/expressSlice' ;
1212import { useActiveWorkspace } from 'src/hooks/useActiveWorkspace' ;
13+ import { useCanAccessToActiveWorkspace } from 'src/hooks/useCanAccessToActiveWorkspace' ;
1314
1415export const ProjectDropdown = ( ) => {
1516 const { t } = useTranslation ( ) ;
1617 const dispatch = useAppDispatch ( ) ;
1718 const { activeWorkspace } = useActiveWorkspace ( ) ;
18-
19+ const canAccessWorkspace = useCanAccessToActiveWorkspace ( ) ;
1920 const { project, projectLocked } = useAppSelector ( ( state ) => state . express ) ;
2021
2122 // Get workspaces projects from rtk query
@@ -32,7 +33,7 @@ export const ProjectDropdown = () => {
3233 ) : (
3334 < Field >
3435 < Autocomplete
35- isCreatable
36+ isCreatable = { canAccessWorkspace }
3637 startIcon = { < FolderIcon /> }
3738 { ...( projectLocked && project && { isDisabled : true } ) }
3839 onCreateNewOption = { async ( value ) => {
You can’t perform that action at this time.
0 commit comments