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

fix: replace create-toggle2 with create-toggle

This commit is contained in:
Youssef 2022-01-10 13:04:49 +01:00
parent 90af5a40d6
commit e6f0dcd08f
6 changed files with 6 additions and 26 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

@ -24,7 +24,7 @@ const BreadcrumbNav = () => {
item !== 'strategies' &&
item !== 'features' &&
item !== 'features2' &&
item !== 'create-toggle2'
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

@ -101,7 +101,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 +109,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) {