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