diff --git a/client/homebrew/pages/errorPage/errorPage.jsx b/client/homebrew/pages/errorPage/errorPage.jsx index 113c152d0..f57a63fa2 100644 --- a/client/homebrew/pages/errorPage/errorPage.jsx +++ b/client/homebrew/pages/errorPage/errorPage.jsx @@ -1,32 +1,24 @@ -require('./errorPage.less'); -const React = require('react'); -const createClass = require('create-react-class'); -const _ = require('lodash'); -const cx = require('classnames'); +import './errorPage.less'; +import React from 'react'; +import UIPage from '../basePages/uiPage/uiPage.jsx'; +import Markdown from '../../../../shared/naturalcrit/markdown.js'; +import ErrorIndex from './errors/errorIndex.js'; -const UIPage = require('../basePages/uiPage/uiPage.jsx'); +const ErrorPage = ({ brew })=>{ + const errorText = ErrorIndex({ brew })[brew.HBErrorCode.toString()] || ''; -const Markdown = require('../../../../shared/naturalcrit/markdown.js'); - -const ErrorIndex = require('./errors/errorIndex.js'); - -const ErrorPage = createClass({ - displayName : 'ErrorPage', - - render : function(){ - const errorText = ErrorIndex(this.props)[this.props.brew.HBErrorCode.toString()] || ''; - - return + return ( +
-

{`Error ${this.props.brew.status || '000'}`}

-

{this.props.brew.text || 'No error text'}

+

{`Error ${brew?.status || '000'}`}

+

{brew?.text || 'No error text'}


- ; - } -}); + + ); +}; module.exports = ErrorPage;