Use compute auth service and fix static code analyzer warnings (#15)

* Clean up formatting

* Use new compute_auth service
Implment SSO
Implement token refresh
Clean up unit tests

* Fix unit tests

* Fix auth test
Fix warnings

* Update default settings for compute_auth
This commit is contained in:
John Wu
2021-03-04 14:30:56 -08:00
committed by GitHub
parent e1f0006d5e
commit 39e779dc1d
34 changed files with 703 additions and 1462 deletions

View File

@@ -1,11 +1,11 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Typography } from '@material-ui/core';
import React, { Component } from "react";
import PropTypes from "prop-types";
import { Typography } from "@material-ui/core";
export default class ErrorBoundary extends Component {
state = {
error: '',
errorInfo: '',
error: "",
errorInfo: "",
hasError: false,
};
static getDerivedStateFromError(error) {
@@ -15,10 +15,15 @@ export default class ErrorBoundary extends Component {
this.setState({ errorInfo });
}
render() {
if (this.state.hasError) return (<Typography variant="h3" align="center" >Oops. An React JS Error Occured.</Typography>);
return this.props.children;
if (this.state.hasError)
return (
<Typography variant="h3" align="center">
Oops. An React JS Error Occured.
</Typography>
);
return this.props.children;
}
}
ErrorBoundary.propTypes = {
children: PropTypes.oneOfType([ PropTypes.object, PropTypes.array ]).isRequired,
};
children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,
};