mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-27 01:19:00 +02: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