Skip to content

Commit

Permalink
feat: open environment accordion if there is only one environment in …
Browse files Browse the repository at this point in the history
…a project
  • Loading branch information
Tymek committed Sep 19, 2024
1 parent 10ec2e7 commit d7a3d28
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const FeatureOverviewEnvironment = ({
const featureEnvironment = feature?.environments.find(
(featureEnvironment) => featureEnvironment.name === env.name,
);
const defaultExpanded = feature?.environments.length === 1;

return (
<ConditionallyRender
Expand All @@ -143,6 +144,7 @@ const FeatureOverviewEnvironment = ({
className={`environment-accordion ${
env.enabled ? '' : 'accordion-disabled'
}`}
defaultExpanded={defaultExpanded}
>
<StyledAccordionSummary
expandIcon={<ExpandMore titleAccess='Toggle' />}
Expand Down

0 comments on commit d7a3d28

Please sign in to comment.