mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: Hide project selection option in CreateFeatureDialog when OSS (#7669)
This change wraps the project selection option in the CreateFeatureDialog in a conditional that hides it when Unleash is OSS. OSS doesn't have access to the project creation API, so there's no point in showing this.
This commit is contained in:
		
							parent
							
								
									c22196cb77
								
							
						
					
					
						commit
						464568dace
					
				| @ -67,7 +67,7 @@ export const CreateFeatureDialog = ({ | ||||
| }: ICreateFeatureDialogProps) => { | ||||
|     const { setToastData, setToastApiError } = useToast(); | ||||
|     const { setShowFeedback } = useContext(UIContext); | ||||
|     const { uiConfig } = useUiConfig(); | ||||
|     const { uiConfig, isOss } = useUiConfig(); | ||||
|     const navigate = useNavigate(); | ||||
| 
 | ||||
|     const { | ||||
| @ -215,11 +215,16 @@ export const CreateFeatureDialog = ({ | ||||
|                     setName={setName} | ||||
|                     configButtons={ | ||||
|                         <> | ||||
|                             <ConditionallyRender | ||||
|                                 condition={!isOss()} | ||||
|                                 show={ | ||||
|                                     <SingleSelectConfigButton | ||||
|                                         tooltip={{ | ||||
|                                             header: 'Select a project for the flag', | ||||
|                                         }} | ||||
|                                 description={configButtonData.project.text} | ||||
|                                         description={ | ||||
|                                             configButtonData.project.text | ||||
|                                         } | ||||
|                                         options={projects.map((project) => ({ | ||||
|                                             label: project.name, | ||||
|                                             value: project.id, | ||||
| @ -237,11 +242,14 @@ export const CreateFeatureDialog = ({ | ||||
|                                             placeholder: 'Select project', | ||||
|                                         }} | ||||
|                                         onOpen={() => | ||||
|                                     setDocumentation(configButtonData.project) | ||||
|                                             setDocumentation( | ||||
|                                                 configButtonData.project, | ||||
|                                             ) | ||||
|                                         } | ||||
|                                         onClose={clearDocumentationOverride} | ||||
|                                     /> | ||||
| 
 | ||||
|                                 } | ||||
|                             /> | ||||
|                             <SingleSelectConfigButton | ||||
|                                 tooltip={{ | ||||
|                                     header: 'Select a flag type', | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user