mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	chore: fix rendering issue without setConstraints (#9975)
The current implementation states that if you do not have access—typically as a viewer user—it renders the old component. Rendering an empty view is acceptable, as this is part of the segment creation flow, and if you do not have permissions, you do not need to see it.
This commit is contained in:
		
							parent
							
								
									257b8d1f40
								
							
						
					
					
						commit
						5f4d7de62e
					
				@ -202,14 +202,14 @@ export const SegmentFormStepTwo: React.FC<ISegmentFormPartTwoProps> = ({
 | 
			
		||||
                    }
 | 
			
		||||
                />
 | 
			
		||||
                <StyledConstraintContainer>
 | 
			
		||||
                    {addEditStrategy &&
 | 
			
		||||
                    hasAccess(modePermission, project) &&
 | 
			
		||||
                    setConstraints ? (
 | 
			
		||||
                        <EditableConstraintsList
 | 
			
		||||
                            ref={constraintsAccordionListRef}
 | 
			
		||||
                            constraints={constraints}
 | 
			
		||||
                            setConstraints={setConstraints}
 | 
			
		||||
                        />
 | 
			
		||||
                    {addEditStrategy ? (
 | 
			
		||||
                        hasAccess(modePermission, project) && setConstraints ? (
 | 
			
		||||
                            <EditableConstraintsList
 | 
			
		||||
                                ref={constraintsAccordionListRef}
 | 
			
		||||
                                constraints={constraints}
 | 
			
		||||
                                setConstraints={setConstraints}
 | 
			
		||||
                            />
 | 
			
		||||
                        ) : null
 | 
			
		||||
                    ) : (
 | 
			
		||||
                        <ConstraintAccordionList
 | 
			
		||||
                            ref={constraintsAccordionListRef}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user