Passed
Push — master ( e61af0...aea7d3 )
by Seonkuk
09:21 queued 11s
created

Error.render   A

Complexity

Conditions 1

Size

Total Lines 9
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
dl 0
loc 9
rs 9.95
c 0
b 0
f 0
1
import React from 'react';
2
import PropTypes from 'prop-types';
3
4
import Layout from './Layout';
5
6
export default class Error extends React.Component {
7
  render() {
8
    return (
9
      <Layout>
10
        <div className="error-panel">
11
          <div className="error-status">{this.props.statusCode}</div>
12
          <div className="error-code">{this.props.code}</div>
13
          <div className="error-detail">{this.props.message}</div>
14
        </div>
15
      </Layout>
16
    );
17
  }
18
}
19
20
Error.defaultProps = {
21
  statusCode: 0,
22
  code: 'Unknown Error',
23
  message: '',
24
};
25
26
Error.propTypes = {
27
  statusCode: PropTypes.number,
28
  code: PropTypes.string,
29
  message: PropTypes.string,
30
};
31