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

Merge pull request #584 from Unleash/fix/breadcrumb-createToggle2

fix: remove create-toggle2 from breadcrumb menu
This commit is contained in:
Youssef Khedher 2022-01-10 18:28:39 +01:00 committed by GitHub
commit 9e2f1e4a60
6 changed files with 7 additions and 27 deletions

View File

@ -339,7 +339,7 @@ exports[`renders correctly with permissions 1`] = `
className="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
>
<a
href="/projects/default/create-toggle2?name=ToggleB"
href="/projects/default/create-toggle?name=ToggleB"
onClick={[Function]}
>
ToggleB

View File

@ -91,7 +91,7 @@ function ApplicationView({
key={`toggle_conditional_${name}`}
condition={notFound}
show={notFoundListItem({
createUrl: `/projects/default/create-toggle2?name=${name}`,
createUrl: `/projects/default/create-toggle?name=${name}`,
name,
permission: CREATE_FEATURE,
i,

View File

@ -23,7 +23,8 @@ const BreadcrumbNav = () => {
item !== 'copy' &&
item !== 'strategies' &&
item !== 'features' &&
item !== 'features2'
item !== 'features2' &&
item !== 'create-toggle'
);
return (

View File

@ -62,17 +62,8 @@ Array [
"layout": "main",
"menu": Object {},
"parent": "/projects/:id/features",
"path": "/projects/:projectId/create-toggle2",
"title": "Create feature toggle",
"type": "protected",
},
Object {
"component": [Function],
"layout": "main",
"menu": Object {},
"parent": "/projects",
"path": "/projects/:projectId/create-toggle",
"title": "Create",
"title": "Create feature toggle",
"type": "protected",
},
Object {

View File

@ -1,4 +1,3 @@
import CreateFeatureToggle from '../../page/features/create';
import CopyFeatureToggle from '../../page/features/copy';
import ViewFeatureToggle from '../../page/features/show';
import Features from '../../page/features';
@ -101,7 +100,7 @@ export const routes = [
menu: {},
},
{
path: '/projects/:projectId/create-toggle2',
path: '/projects/:projectId/create-toggle',
parent: '/projects/:id/features',
title: 'Create feature toggle',
component: FeatureCreate,
@ -109,15 +108,6 @@ export const routes = [
layout: 'main',
menu: {},
},
{
path: '/projects/:projectId/create-toggle',
parent: '/projects',
title: 'Create',
component: CreateFeatureToggle,
type: 'protected',
layout: 'main',
menu: {},
},
{
path: '/projects/:projectId/features/:name',
parent: '/features',

View File

@ -14,9 +14,7 @@ export const getCreateTogglePath = (
newPath: boolean = false,
query?: Object
) => {
const path = newPath
? `/projects/${projectId}/create-toggle2`
: `/projects/${projectId}/create-toggle`;
const path = `/projects/${projectId}/create-toggle`;
let queryString;
if (query) {