fixed all warnings (if it was possible)
All checks were successful
SimcoDash/simcompanies-dashboard/pipeline/head This commit looks good
All checks were successful
SimcoDash/simcompanies-dashboard/pipeline/head This commit looks good
This commit is contained in:
@@ -22,7 +22,7 @@ class ProtectedRoute extends Component {
|
||||
async componentWillMount() {
|
||||
const url = "/simcompanies/API/testlogin";
|
||||
const response = await fetch(url);
|
||||
if (response.status == "200") {
|
||||
if (response.status === 200) {
|
||||
this.setState({
|
||||
auth: true
|
||||
});
|
||||
@@ -59,7 +59,7 @@ class CheckRoute extends Component {
|
||||
async componentWillMount() {
|
||||
const url = "/simcompanies/API/testlogin";
|
||||
const response = await fetch(url);
|
||||
if (response.status == "200") {
|
||||
if (response.status === 200) {
|
||||
this.setState({
|
||||
auth: true
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import React from 'react';
|
||||
import { Link } from "react-router-dom";
|
||||
import { makeStyles, withStyles } from '@material-ui/core/styles';
|
||||
import Card from '@material-ui/core/Card';
|
||||
import CardContent from '@material-ui/core/CardContent';
|
||||
@@ -84,7 +83,7 @@ export default function CreateAccount() {
|
||||
const text = await response.text()
|
||||
await setStatusText(text)
|
||||
setStatus(response.status)
|
||||
if (response.status == "200") {
|
||||
if (response.status === 200) {
|
||||
setTimeout(() => { setLogin(false) }, 2000)
|
||||
}
|
||||
setDisabled(false)
|
||||
@@ -139,7 +138,7 @@ export default function CreateAccount() {
|
||||
<Grid item xs={12} >
|
||||
<Box display="flex" justifyContent="center" >
|
||||
<CssTextField
|
||||
error={status != null && status != "200"}
|
||||
error={status != null && status !== 200}
|
||||
id="usernameInput"
|
||||
label="Username"
|
||||
variant="outlined"
|
||||
@@ -154,7 +153,7 @@ export default function CreateAccount() {
|
||||
<Grid item xs={12}>
|
||||
<Box display="flex" justifyContent="center" >
|
||||
<CssTextField
|
||||
error={status != null && status != "200"}
|
||||
error={status != null && status !== 200}
|
||||
id="passwordInput"
|
||||
type="password"
|
||||
label="Password"
|
||||
|
||||
@@ -88,7 +88,7 @@ export default function Login() {
|
||||
const text = await response.text()
|
||||
await setStatusText(text)
|
||||
setStatus(response.status)
|
||||
if (response.status == "200") {
|
||||
if (response.status === 200) {
|
||||
setTimeout(() => { setLogin(false) }, 2000)
|
||||
|
||||
}
|
||||
@@ -149,7 +149,7 @@ export default function Login() {
|
||||
<Grid item xs={12} >
|
||||
<Box display="flex" justifyContent="center" >
|
||||
<CssTextField
|
||||
error={status != null && status != "200"}
|
||||
error={status != null && status !== 200}
|
||||
id="usernameInput"
|
||||
label="Username"
|
||||
variant="outlined"
|
||||
@@ -164,7 +164,7 @@ export default function Login() {
|
||||
<Grid item xs={12}>
|
||||
<Box display="flex" justifyContent="center" >
|
||||
<CssTextField
|
||||
error={status != null && status != "200"}
|
||||
error={status != null && status !== 200}
|
||||
id="passwordInput"
|
||||
type="password"
|
||||
label="Password"
|
||||
|
||||
@@ -14,7 +14,7 @@ export default function LoginFeedback(props) {
|
||||
const [change, setChange] = React.useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (login != props.login) {
|
||||
if (login !== props.login) {
|
||||
setChange(true)
|
||||
setOpen(true)
|
||||
setOpen1(true)
|
||||
@@ -31,7 +31,7 @@ export default function LoginFeedback(props) {
|
||||
};
|
||||
|
||||
const snack = (login) => {
|
||||
if (login == "200") {
|
||||
if (login === 200) {
|
||||
setOutput(
|
||||
<Snackbar open={open} autoHideDuration={2000} onClose={handleClose}>
|
||||
<Alert onClose={handleClose} severity="success">
|
||||
@@ -52,7 +52,7 @@ export default function LoginFeedback(props) {
|
||||
setChange(false)
|
||||
}
|
||||
|
||||
if (change == true) {
|
||||
if (change === true) {
|
||||
snack(login)
|
||||
}
|
||||
|
||||
|
||||
@@ -17,16 +17,11 @@ import Footer from "./footer";
|
||||
import Content from "./content"
|
||||
import Link1 from '@material-ui/core/Link';
|
||||
import { Link } from "react-router-dom";
|
||||
import SearchIcon from '@material-ui/icons/Search';
|
||||
import InputBase from '@material-ui/core/InputBase';
|
||||
import EmojiObjectsIcon from '@material-ui/icons/EmojiObjects';
|
||||
import { ListItemIcon } from '@material-ui/core';
|
||||
import Tooltip from '@material-ui/core/Tooltip';
|
||||
import Zoom from '@material-ui/core/Zoom';
|
||||
import ApartmentIcon from '@material-ui/icons/Apartment';
|
||||
import MenuItem from '@material-ui/core/MenuItem';
|
||||
import Menu from '@material-ui/core/Menu';
|
||||
import AccountCircle from '@material-ui/icons/AccountCircle';
|
||||
import AccountMenu from './accountMenu/accountMenu';
|
||||
|
||||
const drawerWidth = 64;
|
||||
|
||||
@@ -2,13 +2,11 @@ import React, { useEffect } from 'react';
|
||||
import {
|
||||
useParams
|
||||
} from "react-router-dom";
|
||||
import CircularProgress from '@material-ui/core/CircularProgress';
|
||||
import Card from '@material-ui/core/Card';
|
||||
import CardContent from '@material-ui/core/CardContent';
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import Grid from '@material-ui/core/Grid';
|
||||
import Button from '@material-ui/core/Button';
|
||||
import Chart from './chart';
|
||||
import FormHelperText from '@material-ui/core/FormHelperText';
|
||||
import MenuItem from '@material-ui/core/MenuItem';
|
||||
|
||||
Reference in New Issue
Block a user