Enable file upload form
Enable error boundary to catch React errors (#7) Fix warning for link noreferrer Include authorization header with file upload
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Typography } from '@material-ui/core';
|
||||
|
||||
export default class ErrorBoundary extends Component {
|
||||
state = {
|
||||
@@ -14,7 +15,7 @@ export default class ErrorBoundary extends Component {
|
||||
this.setState({ errorInfo });
|
||||
}
|
||||
render() {
|
||||
if (this.state.hasError) return (<h1>Oops. An Error Occured</h1>);
|
||||
if (this.state.hasError) return (<Typography variant="h3" align="center" >Oops. An React JS Error Occured.</Typography>);
|
||||
return this.props.children;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user