Skip to content

Commit

Permalink
fix: environment id missing bug (#4397)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus authored Aug 4, 2023
1 parent 8e3eaf1 commit d001b86
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ export const FeatureStrategyForm = ({
<StrategyVariants
strategy={strategy}
setStrategy={setStrategy}
environment={environmentId}
projectId={projectId}
/>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ test('should render variants', async () => {
currentStrategy = strategy;

return (
<StrategyVariants strategy={strategy} setStrategy={setStrategy} />
<StrategyVariants
strategy={strategy}
setStrategy={setStrategy}
projectId={'default'}
environment={'development'}
/>
);
};
render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export const StrategyVariants: FC<{
React.SetStateAction<Partial<IFeatureStrategy>>
>;
strategy: Partial<IFeatureStrategy>;
}> = ({ strategy, setStrategy }) => {
const projectId = useRequiredPathParam('projectId');
const environment = useRequiredQueryParam('environmentId');
projectId: string;
environment: string;
}> = ({ strategy, setStrategy, projectId, environment }) => {
const [variantsEdit, setVariantsEdit] = useState<IFeatureVariantEdit[]>([]);
const theme = useTheme();
const stickiness =
Expand Down

0 comments on commit d001b86

Please sign in to comment.