Skip to content

Commit

Permalink
fix: 🐛 Error page no longer displays white screen (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipoliko authored Nov 14, 2019
1 parent 337df5f commit 9345834
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/page/renderer/ViewAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export default class ViewAdapter extends React.Component {
*/
componentDidCatch() {}

static getDerivedStateFromError() {}

/**
* @inheritdoc
*/
Expand Down
3 changes: 2 additions & 1 deletion packages/examples/feed/page/error/ErrorController.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default class ErrorController extends AbstractController {
*/
load() {
return {
status: this.status
status: this.status,
error: this.params.error
};
}
}
10 changes: 7 additions & 3 deletions packages/examples/feed/page/error/page-error.less
Original file line number Diff line number Diff line change
@@ -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;
}
}
2 changes: 1 addition & 1 deletion packages/examples/hello/page/error/ErrorController.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class ErrorController extends AbstractPageController {
load() {
return {
status: this.status,
error: this.params
error: this.params.error
};
}
}
2 changes: 1 addition & 1 deletion packages/examples/todos/page/error/ErrorController.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class ErrorController extends AbstractController {
load() {
return {
status: this.status,
error: this.params
error: this.params.error
};
}
}
1 change: 1 addition & 0 deletions packages/examples/todos/page/error/page-error.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.l-error {

h1{
font-size: 2em;
}
Expand Down

0 comments on commit 9345834

Please sign in to comment.