diff --git a/packages/core/src/page/renderer/ViewAdapter.js b/packages/core/src/page/renderer/ViewAdapter.js index 2197995430..a3388741f9 100644 --- a/packages/core/src/page/renderer/ViewAdapter.js +++ b/packages/core/src/page/renderer/ViewAdapter.js @@ -52,6 +52,8 @@ export default class ViewAdapter extends React.Component { */ componentDidCatch() {} + static getDerivedStateFromError() {} + /** * @inheritdoc */ diff --git a/packages/examples/feed/page/error/ErrorController.js b/packages/examples/feed/page/error/ErrorController.js index 7518e9e0c1..9a80d29fce 100755 --- a/packages/examples/feed/page/error/ErrorController.js +++ b/packages/examples/feed/page/error/ErrorController.js @@ -18,7 +18,8 @@ export default class ErrorController extends AbstractController { */ load() { return { - status: this.status + status: this.status, + error: this.params.error }; } } diff --git a/packages/examples/feed/page/error/page-error.less b/packages/examples/feed/page/error/page-error.less index 9e146820ce..7a20c8f0ac 100755 --- a/packages/examples/feed/page/error/page-error.less +++ b/packages/examples/feed/page/error/page-error.less @@ -1,7 +1,11 @@ .l-error { + + h1{ + font-size: 2em; + } + .messageĀ { - margin: 0 auto; - padding-top: 50px; - text-align: center; + font-size: 1.2em; + text-align: left; } } diff --git a/packages/examples/hello/page/error/ErrorController.js b/packages/examples/hello/page/error/ErrorController.js index aa0169eab6..ddc08ddf99 100755 --- a/packages/examples/hello/page/error/ErrorController.js +++ b/packages/examples/hello/page/error/ErrorController.js @@ -24,7 +24,7 @@ export default class ErrorController extends AbstractPageController { load() { return { status: this.status, - error: this.params + error: this.params.error }; } } diff --git a/packages/examples/todos/page/error/ErrorController.js b/packages/examples/todos/page/error/ErrorController.js index f11bbbb434..e7e93272d6 100755 --- a/packages/examples/todos/page/error/ErrorController.js +++ b/packages/examples/todos/page/error/ErrorController.js @@ -25,7 +25,7 @@ export default class ErrorController extends AbstractController { load() { return { status: this.status, - error: this.params + error: this.params.error }; } } diff --git a/packages/examples/todos/page/error/page-error.less b/packages/examples/todos/page/error/page-error.less index 7f1f32ec91..7a20c8f0ac 100755 --- a/packages/examples/todos/page/error/page-error.less +++ b/packages/examples/todos/page/error/page-error.less @@ -1,4 +1,5 @@ .l-error { + h1{ font-size: 2em; }