mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: fix copy functionality always being disabled
This commit is contained in:
		
							parent
							
								
									90296bed82
								
							
						
					
					
						commit
						b47dbd37ff
					
				@ -68,7 +68,10 @@ export const CopyFeatureToggle = () => {
 | 
			
		||||
    const [apiError, setApiError] = useState('');
 | 
			
		||||
    const [nameError, setNameError] = useState<string | undefined>();
 | 
			
		||||
    const [newToggleName, setNewToggleName] = useState<string>();
 | 
			
		||||
    const { cloneFeatureToggle, validateFeatureToggleName } = useFeatureApi();
 | 
			
		||||
    const {
 | 
			
		||||
        cloneFeatureToggle,
 | 
			
		||||
        validateFeatureToggleName,
 | 
			
		||||
    } = useFeatureApi();
 | 
			
		||||
    const featureId = useRequiredPathParam('featureId');
 | 
			
		||||
    const projectId = useRequiredPathParam('projectId');
 | 
			
		||||
    const { feature } = useFeature(projectId, featureId);
 | 
			
		||||
@ -134,7 +137,7 @@ export const CopyFeatureToggle = () => {
 | 
			
		||||
                show={<Alert severity='error'>{apiError}</Alert>}
 | 
			
		||||
            />
 | 
			
		||||
            <ConditionallyRender
 | 
			
		||||
                condition={Boolean(isChangeRequestConfiguredInAnyEnv)}
 | 
			
		||||
                condition={isChangeRequestConfiguredInAnyEnv()}
 | 
			
		||||
                show={
 | 
			
		||||
                    <StyledAlert severity='error'>
 | 
			
		||||
                        Copy functionality is disabled for this project because
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user