From 62256e0c52de55c558cb0fc3d11189c99db21d6c Mon Sep 17 00:00:00 2001 From: sjaanus Date: Tue, 24 Oct 2023 11:58:50 +0300 Subject: [PATCH] bug: remove strategies from copy breadcrumbs --- .../component/feature/CopyFeature/CopyFeature.test.tsx | 8 ++++---- .../src/component/feature/FeatureView/FeatureView.tsx | 2 +- frontend/src/component/menu/routes.ts | 4 ++-- .../ProjectFeatureToggles/ActionsCell/ActionsCell.tsx | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/component/feature/CopyFeature/CopyFeature.test.tsx b/frontend/src/component/feature/CopyFeature/CopyFeature.test.tsx index e6e1efaf53..9417cbfc2d 100644 --- a/frontend/src/component/feature/CopyFeature/CopyFeature.test.tsx +++ b/frontend/src/component/feature/CopyFeature/CopyFeature.test.tsx @@ -50,13 +50,13 @@ test('should render an alert when change request is enabled in any env when copy } /> , { - route: '/projects/default/features/someFeature/strategies/copy', + route: '/projects/default/features/someFeature/copy', permissions: [{ permission: CREATE_FEATURE }], }, ); @@ -71,12 +71,12 @@ test('should not render an alert when change request is disabled when copying fe render( } /> , { - route: '/projects/default/features/someFeature/strategies/copy', + route: '/projects/default/features/someFeature/copy', permissions: [{ permission: CREATE_FEATURE }], }, ); diff --git a/frontend/src/component/feature/FeatureView/FeatureView.tsx b/frontend/src/component/feature/FeatureView/FeatureView.tsx index 8358ed0a38..7180bedf87 100644 --- a/frontend/src/component/feature/FeatureView/FeatureView.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureView.tsx @@ -252,7 +252,7 @@ export const FeatureView = () => { projectId={projectId} data-loading component={Link} - to={`/projects/${projectId}/features/${featureId}/strategies/copy`} + to={`/projects/${projectId}/features/${featureId}/copy`} tooltipProps={{ title: 'Copy feature toggle', }} diff --git a/frontend/src/component/menu/routes.ts b/frontend/src/component/menu/routes.ts index 42d7110f80..0f930b829d 100644 --- a/frontend/src/component/menu/routes.ts +++ b/frontend/src/component/menu/routes.ts @@ -76,8 +76,8 @@ export const routes: IRoute[] = [ menu: {}, }, { - path: '/projects/:projectId/features/:featureId/:activeTab/copy', - parent: '/projects/:projectId/features/:featureId/:activeTab', + path: '/projects/:projectId/features/:featureId/copy', + parent: '/projects/:projectId/features/:featureId/', title: 'Copy', component: CopyFeatureToggle, type: 'protected', diff --git a/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx b/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx index 4e1fc7c52a..b308c58ce1 100644 --- a/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx +++ b/frontend/src/component/project/Project/ProjectFeatureToggles/ActionsCell/ActionsCell.tsx @@ -103,7 +103,7 @@ export const ActionsCell: VFC = ({ onClick={handleClose} disabled={!hasAccess} component={RouterLink} - to={`/projects/${projectId}/features/${featureId}/strategies/copy`} + to={`/projects/${projectId}/features/${featureId}/copy`} >