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" className="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
> >
<a <a
href="/projects/default/create-toggle2?name=ToggleB" href="/projects/default/create-toggle?name=ToggleB"
onClick={[Function]} onClick={[Function]}
> >
ToggleB ToggleB

View File

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

View File

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

View File

@ -62,17 +62,8 @@ Array [
"layout": "main", "layout": "main",
"menu": Object {}, "menu": Object {},
"parent": "/projects/:id/features", "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", "path": "/projects/:projectId/create-toggle",
"title": "Create", "title": "Create feature toggle",
"type": "protected", "type": "protected",
}, },
Object { Object {

View File

@ -101,7 +101,7 @@ export const routes = [
menu: {}, menu: {},
}, },
{ {
path: '/projects/:projectId/create-toggle2', path: '/projects/:projectId/create-toggle',
parent: '/projects/:id/features', parent: '/projects/:id/features',
title: 'Create feature toggle', title: 'Create feature toggle',
component: FeatureCreate, component: FeatureCreate,
@ -109,15 +109,6 @@ export const routes = [
layout: 'main', layout: 'main',
menu: {}, menu: {},
}, },
{
path: '/projects/:projectId/create-toggle',
parent: '/projects',
title: 'Create',
component: CreateFeatureToggle,
type: 'protected',
layout: 'main',
menu: {},
},
{ {
path: '/projects/:projectId/features/:name', path: '/projects/:projectId/features/:name',
parent: '/features', parent: '/features',

View File

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