mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
refactor: use conditionally render instead of && (#4620)
For consistency and readability.
This commit is contained in:
parent
caff040a88
commit
34d595b5a6
@ -157,18 +157,28 @@ const FeatureForm: React.FC<IFeatureToggleForm> = ({
|
|||||||
<dd>
|
<dd>
|
||||||
<code>{featureNaming?.pattern}</code>
|
<code>{featureNaming?.pattern}</code>
|
||||||
</dd>
|
</dd>
|
||||||
{Boolean(featureNaming?.example) && (
|
<ConditionallyRender
|
||||||
<>
|
condition={Boolean(featureNaming?.example)}
|
||||||
<dt>Example</dt>
|
show={
|
||||||
<dd>{featureNaming?.example}</dd>
|
<>
|
||||||
</>
|
<dt>Example</dt>
|
||||||
)}
|
<dd>{featureNaming?.example}</dd>
|
||||||
{Boolean(featureNaming?.description) && (
|
</>
|
||||||
<>
|
}
|
||||||
<dt>Description</dt>
|
/>
|
||||||
<dd>{featureNaming?.description}</dd>
|
<ConditionallyRender
|
||||||
</>
|
condition={Boolean(
|
||||||
)}
|
featureNaming?.description
|
||||||
|
)}
|
||||||
|
show={
|
||||||
|
<>
|
||||||
|
<dt>Description</dt>
|
||||||
|
<dd>
|
||||||
|
{featureNaming?.description}
|
||||||
|
</dd>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</StyledFlagNamingInfo>
|
</StyledFlagNamingInfo>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user