1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00

fix: environment id missing bug (#4397)

This commit is contained in:
Jaanus Sellin 2023-08-04 11:29:03 +03:00 committed by GitHub
parent 8e3eaf158e
commit d001b864f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 4 deletions

View File

@ -257,6 +257,8 @@ export const FeatureStrategyForm = ({
<StrategyVariants
strategy={strategy}
setStrategy={setStrategy}
environment={environmentId}
projectId={projectId}
/>
}
/>

View File

@ -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(

View File

@ -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 =