mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: diff component for ordering (#4552)
This commit is contained in:
parent
31e2260c46
commit
f881103701
@ -50,7 +50,10 @@ export const EnvironmentStrategyExecutionOrder = ({
|
|||||||
project,
|
project,
|
||||||
actions,
|
actions,
|
||||||
}: IEnvironmentStrategyExecutionOrderProps) => {
|
}: IEnvironmentStrategyExecutionOrderProps) => {
|
||||||
const { feature: featureData } = useFeature(project, feature);
|
const { feature: featureData, loading } = useFeature(project, feature);
|
||||||
|
|
||||||
|
if (loading) return null;
|
||||||
|
|
||||||
const featureEnvironment = featureData.environments.find(
|
const featureEnvironment = featureData.environments.find(
|
||||||
({ name }) => environment === name
|
({ name }) => environment === name
|
||||||
);
|
);
|
||||||
@ -71,9 +74,11 @@ export const EnvironmentStrategyExecutionOrder = ({
|
|||||||
.map(strategy => strategy.id) ?? [],
|
.map(strategy => strategy.id) ?? [],
|
||||||
};
|
};
|
||||||
|
|
||||||
const updatedStrategies = change.payload.map(({ id }) => {
|
const updatedStrategies = change.payload
|
||||||
return environmentStrategies.find(s => s.id === id);
|
.map(({ id }) => {
|
||||||
});
|
return environmentStrategies.find(s => s.id === id);
|
||||||
|
})
|
||||||
|
.filter(Boolean);
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
strategyIds: updatedStrategies.map(strategy => strategy!.id),
|
strategyIds: updatedStrategies.map(strategy => strategy!.id),
|
||||||
|
Loading…
Reference in New Issue
Block a user