Skip to content

Commit

Permalink
fix: Also display strategy variant information on default strategies (#…
Browse files Browse the repository at this point in the history
…8115)

This change copies (and then simplifies) the strategy variant display
logic from

`frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/EnvironmentAccordionBody/StrategyDraggableItem/StrategyItem/StrategyItem.tsx`
and inserts it into the `ProjectEnvironmentDefaultStrategy` component.

Before:

![image](https://github.com/user-attachments/assets/c00098c3-3161-4a89-a6cf-8db711b4fb3e)


After:

![image](https://github.com/user-attachments/assets/4fdd46f1-97a4-4344-98e1-16c842947a1c)
  • Loading branch information
thomasheartman authored Sep 6, 2024
1 parent ae71932 commit 7e52da1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { StrategyExecution } from 'component/feature/FeatureView/FeatureOverview
import type { ProjectEnvironmentType } from 'interfaces/environments';
import { useMemo } from 'react';
import type { CreateFeatureStrategySchema } from 'openapi';
import SplitPreviewSlider from 'component/feature/StrategyTypes/SplitPreviewSlider/SplitPreviewSlider';

interface ProjectEnvironmentDefaultStrategyProps {
environment: ProjectEnvironmentType;
Expand Down Expand Up @@ -75,6 +76,10 @@ const ProjectEnvironmentDefaultStrategy = ({
}
>
<StrategyExecution strategy={strategy} />

{strategy.variants && strategy.variants.length > 0 ? (
<SplitPreviewSlider variants={strategy.variants} />
) : null}
</StrategyItemContainer>
</>
);
Expand Down

0 comments on commit 7e52da1

Please sign in to comment.