mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-09 13:47:13 +02:00
feat: open environment accordion if there is only one environment in a project
This commit is contained in:
parent
10ec2e7de5
commit
d7a3d28249
@ -131,6 +131,7 @@ const FeatureOverviewEnvironment = ({
|
||||
const featureEnvironment = feature?.environments.find(
|
||||
(featureEnvironment) => featureEnvironment.name === env.name,
|
||||
);
|
||||
const defaultExpanded = feature?.environments.length === 1;
|
||||
|
||||
return (
|
||||
<ConditionallyRender
|
||||
@ -143,6 +144,7 @@ const FeatureOverviewEnvironment = ({
|
||||
className={`environment-accordion ${
|
||||
env.enabled ? '' : 'accordion-disabled'
|
||||
}`}
|
||||
defaultExpanded={defaultExpanded}
|
||||
>
|
||||
<StyledAccordionSummary
|
||||
expandIcon={<ExpandMore titleAccess='Toggle' />}
|
||||
|
Loading…
Reference in New Issue
Block a user