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>
|
||||
<code>{featureNaming?.pattern}</code>
|
||||
</dd>
|
||||
{Boolean(featureNaming?.example) && (
|
||||
<>
|
||||
<dt>Example</dt>
|
||||
<dd>{featureNaming?.example}</dd>
|
||||
</>
|
||||
)}
|
||||
{Boolean(featureNaming?.description) && (
|
||||
<>
|
||||
<dt>Description</dt>
|
||||
<dd>{featureNaming?.description}</dd>
|
||||
</>
|
||||
)}
|
||||
<ConditionallyRender
|
||||
condition={Boolean(featureNaming?.example)}
|
||||
show={
|
||||
<>
|
||||
<dt>Example</dt>
|
||||
<dd>{featureNaming?.example}</dd>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<ConditionallyRender
|
||||
condition={Boolean(
|
||||
featureNaming?.description
|
||||
)}
|
||||
show={
|
||||
<>
|
||||
<dt>Description</dt>
|
||||
<dd>
|
||||
{featureNaming?.description}
|
||||
</dd>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
</dl>
|
||||
</StyledFlagNamingInfo>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user