1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

Copy strategy bug fix (#2444)

<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
This PR fixes a bug where when you copy a strategy, instead of the
strategy being copied to the target environment, it was copied to the
source environment

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->
This commit is contained in:
andreas-unleash 2022-11-16 09:43:23 +02:00 committed by GitHub
parent 5761aabb76
commit 48c340585b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,14 +82,14 @@ export const CopyStrategyIconMenu: VFC<ICopyStrategyIconMenuProps> = ({
await addStrategyToFeature(
projectId,
featureId,
environmentId,
environment,
strategy
);
refetchFeature();
refetchFeatureImmutable();
setToastData({
title: `Strategy created`,
text: `Successfully copied a strategy to ${environmentId}`,
text: `Successfully copied a strategy to ${environment}`,
type: 'success',
});
} catch (error) {