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:
John Wu
2021-01-20 13:36:40 -08:00
committed by GitHub
parent ec4dd7d35d
commit fcde299197
9 changed files with 43 additions and 24 deletions

View File

@@ -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;
}
}