mirror of
https://github.com/outbackdingo/openapi-ui.git
synced 2026-01-27 18:19:50 +00:00
Merge pull request #37 from PRO-Robotech/feature/BFF
edit id for forms | factory id
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import React, { FC } from 'react'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { ManageableBreadcrumbs, Factory, NavigationContainer } from 'components'
|
||||
import { getBreadcrumbsIdPrefix } from 'utils/getBreadcrumbsIdPrefix'
|
||||
import { BaseTemplate } from 'templates'
|
||||
|
||||
type TFactoryPageProps = {
|
||||
@@ -7,10 +9,17 @@ type TFactoryPageProps = {
|
||||
}
|
||||
|
||||
export const FactoryPage: FC<TFactoryPageProps> = ({ forcedTheme }) => {
|
||||
const { namespace, syntheticProject, key } = useParams()
|
||||
|
||||
const breadcrumbsId = `${getBreadcrumbsIdPrefix({
|
||||
instance: !!syntheticProject,
|
||||
project: !!namespace,
|
||||
})}factory-${key}`
|
||||
|
||||
return (
|
||||
<BaseTemplate forcedTheme={forcedTheme} withNoCluster>
|
||||
<NavigationContainer>
|
||||
<ManageableBreadcrumbs idToCompare={`factory-${window.location.pathname}`} />
|
||||
<ManageableBreadcrumbs idToCompare={breadcrumbsId} />
|
||||
</NavigationContainer>
|
||||
<Factory />
|
||||
</BaseTemplate>
|
||||
|
||||
@@ -43,7 +43,7 @@ export const FormApiPage: FC<TFormApiPageProps> = ({ forcedTheme, inside }) => {
|
||||
instance: !!syntheticProject,
|
||||
project: !!namespace,
|
||||
inside,
|
||||
})}api-form`
|
||||
})}api-form${entryName ? '-edit' : ''}`
|
||||
|
||||
return (
|
||||
<BaseTemplate
|
||||
|
||||
@@ -43,7 +43,7 @@ export const FormBuiltinPage: FC<TFormBuiltinPageProps> = ({ forcedTheme, inside
|
||||
instance: !!syntheticProject,
|
||||
project: !!namespace,
|
||||
inside,
|
||||
})}builtin-form`
|
||||
})}builtin-form${entryName ? '-edit' : ''}`
|
||||
|
||||
return (
|
||||
<BaseTemplate
|
||||
|
||||
@@ -43,7 +43,7 @@ export const FormCrdPage: FC<TFormCrdPageProps> = ({ forcedTheme, inside }) => {
|
||||
instance: !!syntheticProject,
|
||||
project: !!namespace,
|
||||
inside,
|
||||
})}crd-form`
|
||||
})}crd-form${entryName ? '-edit' : ''}`
|
||||
|
||||
return (
|
||||
<BaseTemplate
|
||||
|
||||
Reference in New Issue
Block a user