-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 9.92 KB
/
.eslintcache
1
[{"/var/www/html/React/myapp/src/index.js":"1","/var/www/html/React/myapp/src/App.js":"2","/var/www/html/React/myapp/src/reportWebVitals.js":"3","/var/www/html/React/myapp/src/Components/Login.js":"4","/var/www/html/React/myapp/src/Components/Dashboard/Dashboard.js":"5","/var/www/html/React/myapp/src/Components/Dashboard/listItems.js":"6","/var/www/html/React/myapp/src/Components/Dashboard/Chart.js":"7","/var/www/html/React/myapp/src/Components/Dashboard/Deposits.js":"8","/var/www/html/React/myapp/src/Components/Dashboard/Orders.js":"9","/var/www/html/React/myapp/src/Components/Dashboard/Title.js":"10","/var/www/html/React/myapp/src/Components/Utils/Common.js":"11"},{"size":500,"mtime":1609126576832,"results":"12","hashOfConfig":"13"},{"size":678,"mtime":1615972554845,"results":"14","hashOfConfig":"13"},{"size":362,"mtime":1609126576900,"results":"15","hashOfConfig":"13"},{"size":5352,"mtime":1615972606686,"results":"16","hashOfConfig":"13"},{"size":6697,"mtime":1615972625794,"results":"17","hashOfConfig":"13"},{"size":1975,"mtime":1615725747075,"results":"18","hashOfConfig":"13"},{"size":1428,"mtime":1615724290627,"results":"19","hashOfConfig":"13"},{"size":846,"mtime":1615723872238,"results":"20","hashOfConfig":"13"},{"size":2350,"mtime":1615723907381,"results":"21","hashOfConfig":"13"},{"size":342,"mtime":1615723933735,"results":"22","hashOfConfig":"13"},{"size":714,"mtime":1615905954717,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},"1swwyki",{"filePath":"27","messages":"28","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"33","usedDeprecatedRules":"26"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},"/var/www/html/React/myapp/src/index.js",[],["48","49"],"/var/www/html/React/myapp/src/App.js",["50","51","52"],"/var/www/html/React/myapp/src/reportWebVitals.js",[],"/var/www/html/React/myapp/src/Components/Login.js",["53"],"import React, { useState } from 'react';\nimport {useHistory} from 'react-router';\nimport Avatar from '@material-ui/core/Avatar';\nimport Button from '@material-ui/core/Button';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport TextField from '@material-ui/core/TextField';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport Link from '@material-ui/core/Link';\nimport Grid from '@material-ui/core/Grid';\nimport Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Container from '@material-ui/core/Container';\nimport ExitToAppIcon from '@material-ui/icons/ExitToApp';\nimport axios from 'axios';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport { getToken, setUserSession } from './Utils/Common';\nimport Alert from '@material-ui/lab/Alert';\n// import browserHistory from 'react-router-dom';\n\nfunction Copyright() {\n return (\n <Typography variant=\"body2\" color=\"textSecondary\" align=\"center\">\n {'Copyright © '}\n <Link color=\"inherit\" href=\"#\">\n Student Management\n </Link>{' '}\n {new Date().getFullYear()}\n {'.'}\n </Typography>\n );\n}\n\nconst useStyles = makeStyles((theme) => ({\n paper: {\n marginTop: theme.spacing(8),\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n },\n avatar: {\n margin: theme.spacing(1),\n backgroundColor: theme.palette.secondary.main,\n },\n form: {\n width: '100%', // Fix IE 11 issue.\n marginTop: theme.spacing(1),\n },\n submit: {\n margin: theme.spacing(3, 0, 2),\n },\n buttonProgress: {\n // color: green[500],\n position: 'absolute',\n top: '50%',\n left: '50%',\n marginTop: 5,\n // marginLeft: -12,\n },\n errorAlert:{\n width:'100%'\n },\n \n}));\n\n\n\n export default function SignIn() {\n\n\n const useFormInput = initialValue => {\n const [value, setValue] = useState(initialValue);\n \n const handleChange = e => {\n setValue(e.target.value);\n }\n return {\n value,\n onChange: handleChange\n }\n }\n const classes = useStyles();\n const routerHistory = useHistory();\n \n\n\n const [loading, setLoading] = useState(false);\n const email = useFormInput('');\n const history = useHistory();\n const password = useFormInput('');\n const [error, setError] = useState(null);\n\n const handleLogin = () => {\n setError(null);\n setLoading(true);\n axios.post(\n 'http://127.0.0.1:8000/api/auth/login', { email: email.value, password: password.value }).then(response => {\n setLoading(false);\n console.log(response);\n setUserSession(response.data.access_token, response.data.user);\n setTimeout(() => {\n routerHistory.push('/');\n \n }, 1000);\n \n // browserHistory.push('/')\n }).catch((error) => {\n console.log(error.data);\n // alert(error)\n setLoading(false);\n setError(\"Something went wrong. Please try again later.\");\n // setError(error.data.message)\n // else setError(\"Something went wrong. Please try again later.\");\n });\n }\n\n if(!getToken()){\n routerHistory.push('/login');\n }else{\n routerHistory.push('/');\n }\n\n return (\n \n <Container component=\"main\" maxWidth=\"xs\">\n \n <CssBaseline />\n <div className={classes.paper}>\n <Avatar className={classes.avatar}>\n <ExitToAppIcon />\n </Avatar>\n <Typography component=\"h1\" variant=\"h5\">\n Sign in\n </Typography>\n {error && <Alert severity=\"error\" className={classes.errorAlert}>{error}</Alert>}\n <form className={classes.form} noValidate>\n <TextField\n variant=\"outlined\"\n margin=\"normal\"\n required\n fullWidth\n id=\"email\"\n label=\"Email Address\"\n name=\"email\"\n autoComplete=\"email\"\n autoFocus\n {...email}\n />\n <TextField\n variant=\"outlined\"\n margin=\"normal\"\n required\n fullWidth\n name=\"password\"\n label=\"Password\"\n type=\"password\"\n id=\"password\"\n {...password}\n autoComplete=\"current-password\"\n />\n <FormControlLabel\n control={<Checkbox value=\"remember\" color=\"primary\" />}\n label=\"Remember me\"\n />\n <Button\n type=\"button\"\n fullWidth\n variant=\"contained\"\n color=\"primary\"\n // className={buttonClassname}\n disabled={loading}\n onClick={handleLogin}\n className={classes.submit}\n >\n Sign In\n </Button>\n {loading && <CircularProgress size={24} className={classes.buttonProgress} />}\n\n <Grid container>\n <Grid item xs>\n <Link href=\"#\" variant=\"body2\">\n Forgot password?\n </Link>\n </Grid>\n <Grid item>\n <Link href=\"#\" variant=\"body2\">\n {\"Don't have an account? Sign Up\"}\n </Link>\n </Grid>\n </Grid>\n </form>\n </div>\n <Box mt={8}>\n <Copyright />\n </Box>\n </Container>\n );\n\n}\n\n","/var/www/html/React/myapp/src/Components/Dashboard/Dashboard.js",[],"/var/www/html/React/myapp/src/Components/Dashboard/listItems.js",[],"/var/www/html/React/myapp/src/Components/Dashboard/Chart.js",[],"/var/www/html/React/myapp/src/Components/Dashboard/Deposits.js",[],"/var/www/html/React/myapp/src/Components/Dashboard/Orders.js",[],"/var/www/html/React/myapp/src/Components/Dashboard/Title.js",[],"/var/www/html/React/myapp/src/Components/Utils/Common.js",[],{"ruleId":"54","replacedBy":"55"},{"ruleId":"56","replacedBy":"57"},{"ruleId":"58","severity":1,"message":"59","line":3,"column":17,"nodeType":"60","messageId":"61","endLine":3,"endColumn":25},{"ruleId":"58","severity":1,"message":"62","line":8,"column":3,"nodeType":"60","messageId":"61","endLine":8,"endColumn":11},{"ruleId":"58","severity":1,"message":"63","line":11,"column":10,"nodeType":"60","messageId":"61","endLine":11,"endColumn":18},{"ruleId":"58","severity":1,"message":"64","line":90,"column":9,"nodeType":"60","messageId":"61","endLine":90,"endColumn":16},"no-native-reassign",["65"],"no-negated-in-lhs",["66"],"no-unused-vars","'useState' is defined but never used.","Identifier","unusedVar","'Redirect' is defined but never used.","'getToken' is defined but never used.","'history' is assigned a value but never used.","no-global-assign","no-unsafe-negation"]