500.js 579 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * React Static Boilerplate
  3. * https://github.com/koistya/react-static-boilerplate
  4. * Copyright (c) Konstantin Tarkus (@koistya) | MIT license
  5. */
  6. import React, { Component, PropTypes } from 'react';
  7. export default class extends Component {
  8. static propTypes = {
  9. error: PropTypes.instanceOf(Error),
  10. };
  11. render() {
  12. return (
  13. <div>
  14. <h1>Error</h1>
  15. <pre>{
  16. this.props.error ?
  17. this.props.error.message + '\n\n' + this.props.error.stack :
  18. 'A critical error occurred.'
  19. }</pre>
  20. </div>
  21. );
  22. }
  23. }