feat(error-handling): introduce unified and configurable error handling (#7761)
Refs #7778
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import StandaloneLayout from "./layout"
|
||||
import TopbarPlugin from "plugins/topbar"
|
||||
import ConfigsPlugin from "corePlugins/configs"
|
||||
import SafeRenderPlugin from "core/plugins/safe-render"
|
||||
|
||||
// the Standalone preset
|
||||
|
||||
@@ -11,5 +12,13 @@ export default [
|
||||
return {
|
||||
components: { StandaloneLayout }
|
||||
}
|
||||
}
|
||||
},
|
||||
SafeRenderPlugin({
|
||||
fullOverride: true,
|
||||
componentList: [
|
||||
"Topbar",
|
||||
"StandaloneLayout",
|
||||
"onlineValidatorBadge"
|
||||
]
|
||||
})
|
||||
]
|
||||
|
||||
@@ -21,22 +21,16 @@ export default class StandaloneLayout extends React.Component {
|
||||
const Topbar = getComponent("Topbar", true)
|
||||
const BaseLayout = getComponent("BaseLayout", true)
|
||||
const OnlineValidatorBadge = getComponent("onlineValidatorBadge", true)
|
||||
const ErrorBoundary = getComponent("ErrorBoundary", true)
|
||||
|
||||
|
||||
return (
|
||||
<Container className='swagger-ui'>
|
||||
<ErrorBoundary targetName="Topbar">
|
||||
{Topbar ? <Topbar /> : null}
|
||||
</ErrorBoundary>
|
||||
{Topbar ? <Topbar /> : null}
|
||||
<BaseLayout />
|
||||
<ErrorBoundary targetName="OnlineValidatorBadge">
|
||||
<Row>
|
||||
<Col>
|
||||
<OnlineValidatorBadge />
|
||||
</Col>
|
||||
</Row>
|
||||
</ErrorBoundary>
|
||||
<Row>
|
||||
<Col>
|
||||
<OnlineValidatorBadge />
|
||||
</Col>
|
||||
</Row>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user