-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 17.6 KB
/
.eslintcache
1
[{"C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\index.js":"1","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\App.js":"2","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\Login.js":"3","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\LoginFacebook.js":"4","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\LoginGoogle.js":"5","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\Dashboard.js":"6","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\Logout.js":"7","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\Register.js":"8","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\config\\fire.js":"9"},{"size":185,"mtime":1608698670640,"results":"10","hashOfConfig":"11"},{"size":3129,"mtime":1608728132434,"results":"12","hashOfConfig":"11"},{"size":1966,"mtime":1608726728984,"results":"13","hashOfConfig":"11"},{"size":797,"mtime":1608728034697,"results":"14","hashOfConfig":"11"},{"size":1158,"mtime":1608728335633,"results":"15","hashOfConfig":"11"},{"size":374,"mtime":1608702474412,"results":"16","hashOfConfig":"11"},{"size":359,"mtime":1608728118004,"results":"17","hashOfConfig":"11"},{"size":2215,"mtime":1608726705267,"results":"18","hashOfConfig":"11"},{"size":424,"mtime":1608720293035,"results":"19","hashOfConfig":"11"},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},"jflqhu",{"filePath":"23","messages":"24","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":2,"source":"25","usedDeprecatedRules":"22"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":"28","usedDeprecatedRules":"22"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":"31","usedDeprecatedRules":"22"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"34"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"39","usedDeprecatedRules":"22"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"42","usedDeprecatedRules":"22"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},"C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\index.js",[],["45","46"],"C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\App.js",["47","48","49","50","51","52"],"import React,{useState,useRef,useEffect} from 'react';\nimport './App.css';\nimport Login from './Components/Login';\nimport Dashboard from \"./Components/Dashboard\";\nimport Register from \"./Components/Register\"\nimport fire from \"../src/config/fire\"\n\n\nexport const LoginContext = React.createContext();\n\nfunction App() {\n\n const [isLoggedIn, setisLoggedIn] = useState(false);\n const [name, setname] = useState('');\n // const username = useRef('');\n // const password = useRef('');\n const [user, setuser] = useState('')\n const [email, setemail] = useState('')\n const [password, setpassword] = useState('')\n const [emailError, setemailError] = useState('')\n const [passwordError, setpasswordError] = useState('')\n const [hasAccount, sethasAccount] = useState(false)\n\n const clearInputs = () => {\n setemail('');\n setpassword('');\n\n }\n\n const clearErrors = () => {\n setemailError('')\n setpasswordError('')\n }\n\n const handleLogin = () => {\n clearErrors();\n fire.\n auth()\n .signInWithEmailAndPassword(email, password)\n .catch((err) => {\n switch (err.code) {\n case \"auth/invalid-email\":\n case \"auth/user-disabled\":\n case \"auth/user-not-found\":\n setemailError(err.message);\n break;\n case \"auth/wrong-password\":\n setpasswordError(err.message);\n break;\n }\n })\n }\n\n const handleSignup = () => {\n clearErrors();\n fire.\n auth()\n .createUserWithEmailAndPassword(email, password)\n .catch((err) => {\n switch (err.code) {\n case \"auth/email-already-in-use\":\n case \"auth/invalid-email\":\n setemailError(err.message);\n break;\n case \"auth/weak-password\":\n setpasswordError(err.message);\n break;\n }\n });\n if(user)\n sethasAccount(!hasAccount)\n \n }\n\n const authListener = () => {\n fire.auth().onAuthStateChanged(user => {\n if (user) {\n clearInputs();\n setuser(user)\n } else {\n setuser(\"\")\n }\n })\n }\n\n const handleLogout = () => {\n fire.auth().signOut();\n setuser('')\n }\n\n useEffect(() => {\n authListener();\n }, [])\n\n\nconsole.log(\" isLoggedIn\", isLoggedIn )\n if (user) {\n \n return (\n <LoginContext.Provider value={{ isLoggedIn, setisLoggedIn, name,setname,handleLogout,user,setuser }}>\n <Dashboard></Dashboard>\n </LoginContext.Provider>\n \n )\n\n } else {\n return (\n <LoginContext.Provider value={{\n isLoggedIn, setisLoggedIn,\n user,setuser,\n name,setname,\n email,setemail,\n password, setpassword,\n handleLogin,\n handleSignup,\n handleLogout,\n hasAccount, sethasAccount,\n emailError,\n passwordError\n \n }}>\n \n \n <div className=\"container\">\n <div className=\"left\"></div>\n <div className=\"right\">\n {\n hasAccount? <Login/>: <Register/>\n }\n </div>\n </div>)\n </LoginContext.Provider>\n )\n }\n}\n\nexport default App;\n","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\Login.js",["53","54","55","56","57"],"import React, { useContext } from 'react'\r\nimport {LoginContext} from '../App'\r\nimport LoginGoogle from './LoginGoogle';\r\nimport LoginFacebook from './LoginFacebook'\r\n\r\n\r\n\r\nexport default function Login() {\r\n const { isRegistered, setisRegistered,\r\n email, setemail,\r\n password, setpassword,\r\n handleLogin,\r\n handleSignup,\r\n hasAccount, sethasAccount,\r\n emailError,\r\n passwordError } = useContext(LoginContext)\r\n return (\r\n <div id=\"loginContainer\">\r\n <div id=\"inputContainer\">\r\n <div id=\"loginForm\">\r\n \r\n <h2>Login to your account</h2>\r\n <div>\r\n <label for=\"inputUsername\">Username:</label>\r\n <input type=\"text\" name=\"inputUsername\" id=\"inputUsername\" onChange={(e) => setemail(e.target.value)} placeholder=\"Your Username\" autoFocus required></input>\r\n <p className=\"error\">{emailError}</p>\r\n </div>\r\n \r\n <div>\r\n <label for=\"inputPassword\">Password:</label>\r\n <input type=\"password\" name=\"inputPassword\" id=\"inputPassword\" placeholder=\"Your password\" onChange={(e) => { setpassword(e.target.value) }} required></input>\r\n <p className=\"error\">{ passwordError }</p>\r\n </div>\r\n <button type=\"submit\" name=\"loginButton\" id=\"loginButton\" onClick={()=> handleLogin()}>Login</button>\r\n \r\n <LoginFacebook />\r\n <LoginGoogle/>\r\n\r\n <p className=\"newUser\">New user <button onClick={()=> sethasAccount(!hasAccount)}>Register</button> here</p>\r\n \r\n </div>\r\n\r\n </div>\r\n \r\n </div>\r\n \r\n )\r\n}\r\n","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\LoginFacebook.js",["58","59","60","61","62"],"import React,{useContext} from 'react'\r\nimport { FaFacebookSquare } from \"react-icons/fa\";\r\nimport FacebookLogin from 'react-facebook-login';\r\nimport { LoginContext } from '../App';\r\n\r\n\r\n\r\nconst LoginFacebook = () => {\r\n\r\n const { isLoggedIn,setisLoggedIn,setname,hasAccount,sethasAccount,user,setuser} = useContext(LoginContext)\r\n\r\n\r\n const responseFacebook = (response) => {\r\n setisLoggedIn(true);\r\n setuser(response.name)\r\n \r\n setname(response.name);\r\n console.log(response);\r\n}\r\n\r\n return ( \r\n <FacebookLogin\r\n appId=\"182742250254730\"\r\n autoLoad={false}\r\n fields=\"name,email,picture\"\r\n callback={responseFacebook}\r\n cssClass=\"btn facebook\"\r\n icon=\"fa-facebook\"\r\n />\r\n \r\n\r\n \r\n )\r\n}\r\n\r\nexport default LoginFacebook;\r\n","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\LoginGoogle.js",["63","64"],"import React,{useContext} from 'react'\r\nimport { FaGooglePlusSquare } from \"react-icons/fa\";\r\nimport { GoogleLogin } from 'react-google-login';\r\nimport { LoginContext } from '../App';\r\n\r\n\r\n\r\nexport default function LoginGoogle() {\r\n\r\n const { isLoggedIn,setisLoggedIn,setname,user,setuser } = useContext(LoginContext)\r\n\r\n\r\n const responseGoogle = (response) => {\r\n \r\n setisLoggedIn(true);\r\n setuser(response.profileObj.givenName)\r\n setname(response.profileObj.givenName);\r\n console.log(response);\r\n}\r\n\r\n return (\r\n <>\r\n {/* <button className=\"btn google\"><FaGooglePlusSquare className=\"icon\"/> Sign In with google</button> */}\r\n <GoogleLogin\r\n clientId=\"942126254255-tlu0e13ip3b38eq6if56dnu0nc8bqrs3.apps.googleusercontent.com\"\r\n render={renderProps => (\r\n <button onClick={renderProps.onClick} disabled={renderProps.disabled} className=\"btn google\"><FaGooglePlusSquare className=\"icon\"/> Sign In with google</button>\r\n )}\r\n buttonText=\"Login\"\r\n onSuccess={responseGoogle}\r\n onFailure={responseGoogle}\r\n cookiePolicy={'single_host_origin'}\r\n />\r\n\r\n </>\r\n )\r\n}\r\n","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\Dashboard.js",[],"C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\Logout.js",["65","66","67"],"import React,{useContext} from 'react'\r\nimport { LoginContext } from '../App';\r\n\r\nfunction Logout() {\r\n\r\n const { isLoggedIn, setisLoggedIn, handleLogout,setuser } = useContext(LoginContext);\r\n console.log(useContext(LoginContext));\r\n \r\n return (\r\n <button onClick={()=> handleLogout()}>Logout</button>\r\n )\r\n}\r\n\r\nexport default Logout;\r\n","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\Components\\Register.js",["68","69"],"import React,{useContext} from 'react'\r\nimport { LoginContext } from '../App';\r\n\r\nfunction Register() {\r\n\r\n const { hasAccount,sethasAccount,handleSignup, email, setemail,\r\n password, setpassword,emailError,passwordError} = useContext(LoginContext)\r\n\r\n return (\r\n <div id=\"loginContainer\">\r\n <div id=\"inputContainer\">\r\n <form id=\"loginForm\">\r\n \r\n <h2>Register Account Form</h2>\r\n {/* <p>\r\n <label for=\"inputUsername\">Username:</label>\r\n <input type=\"text\" name=\"inputUsername\" id=\"inputUsername\" placeholder=\"Your Username\" autoFocus required></input>\r\n </p> */}\r\n <p>\r\n <label for=\"inputEmail\">Email:</label>\r\n <input type=\"text\" name=\"inputEmail\" id=\"inputEmail\" placeholder=\"Your Email\" onChange={(e) => setemail(e.target.value)} required></input>\r\n <p className=\"error\">{ emailError }</p>\r\n </p>\r\n <p>\r\n <label for=\"inputPassword\">Password:</label>\r\n <input type=\"password\" name=\"inputPassword\" id=\"inputPassword\" placeholder=\"Your password\" onChange={(e) => setpassword(e.target.value)} required></input>\r\n <p className=\"error\">{ passwordError }</p>\r\n </p>\r\n {/* <p>\r\n <label for=\"inputConfirmPassword\">Confirm Password:</label>\r\n <input type=\"text\" name=\"inputConfirmPassword\" id=\"inputConfirmPassword\" placeholder=\"Confirm Password\"required></input>\r\n </p> */}\r\n <button type=\"submit\" name=\"loginButton\" id=\"loginButton\" onClick={()=> handleSignup()}>Sign Up</button>\r\n <p className=\"newUser\">Already Have an account <button onClick={()=> sethasAccount(!hasAccount)}>Login</button> Here</p>\r\n \r\n </form>\r\n\r\n </div>\r\n \r\n </div>\r\n )\r\n}\r\n\r\nexport default Register\r\n","C:\\Users\\Guri\\Desktop\\ReactJS\\login\\src\\config\\fire.js",[],{"ruleId":"70","replacedBy":"71"},{"ruleId":"72","replacedBy":"73"},{"ruleId":"74","severity":1,"message":"75","line":1,"column":24,"nodeType":"76","messageId":"77","endLine":1,"endColumn":30},{"ruleId":"78","severity":1,"message":"79","line":37,"column":9,"nodeType":"80","messageId":"81","endLine":37,"endColumn":10,"fix":"82"},{"ruleId":"83","severity":1,"message":"84","line":41,"column":9,"nodeType":"85","messageId":"86","endLine":50,"endColumn":12},{"ruleId":"78","severity":1,"message":"79","line":56,"column":9,"nodeType":"80","messageId":"81","endLine":56,"endColumn":10,"fix":"87"},{"ruleId":"83","severity":1,"message":"84","line":60,"column":9,"nodeType":"85","messageId":"86","endLine":68,"endColumn":10},{"ruleId":"88","severity":1,"message":"89","line":93,"column":6,"nodeType":"90","endLine":93,"endColumn":8,"suggestions":"91"},{"ruleId":"74","severity":1,"message":"92","line":9,"column":13,"nodeType":"76","messageId":"77","endLine":9,"endColumn":25},{"ruleId":"74","severity":1,"message":"93","line":9,"column":27,"nodeType":"76","messageId":"77","endLine":9,"endColumn":42},{"ruleId":"74","severity":1,"message":"94","line":10,"column":9,"nodeType":"76","messageId":"77","endLine":10,"endColumn":14},{"ruleId":"74","severity":1,"message":"95","line":11,"column":9,"nodeType":"76","messageId":"77","endLine":11,"endColumn":17},{"ruleId":"74","severity":1,"message":"96","line":13,"column":9,"nodeType":"76","messageId":"77","endLine":13,"endColumn":21},{"ruleId":"74","severity":1,"message":"97","line":2,"column":10,"nodeType":"76","messageId":"77","endLine":2,"endColumn":26},{"ruleId":"74","severity":1,"message":"98","line":10,"column":13,"nodeType":"76","messageId":"77","endLine":10,"endColumn":23},{"ruleId":"74","severity":1,"message":"99","line":10,"column":46,"nodeType":"76","messageId":"77","endLine":10,"endColumn":56},{"ruleId":"74","severity":1,"message":"100","line":10,"column":57,"nodeType":"76","messageId":"77","endLine":10,"endColumn":70},{"ruleId":"74","severity":1,"message":"101","line":10,"column":71,"nodeType":"76","messageId":"77","endLine":10,"endColumn":75},{"ruleId":"74","severity":1,"message":"98","line":10,"column":11,"nodeType":"76","messageId":"77","endLine":10,"endColumn":21},{"ruleId":"74","severity":1,"message":"101","line":10,"column":44,"nodeType":"76","messageId":"77","endLine":10,"endColumn":48},{"ruleId":"74","severity":1,"message":"98","line":6,"column":13,"nodeType":"76","messageId":"77","endLine":6,"endColumn":23},{"ruleId":"74","severity":1,"message":"102","line":6,"column":25,"nodeType":"76","messageId":"77","endLine":6,"endColumn":38},{"ruleId":"74","severity":1,"message":"103","line":6,"column":53,"nodeType":"76","messageId":"77","endLine":6,"endColumn":60},{"ruleId":"74","severity":1,"message":"94","line":6,"column":53,"nodeType":"76","messageId":"77","endLine":6,"endColumn":58},{"ruleId":"74","severity":1,"message":"95","line":7,"column":9,"nodeType":"76","messageId":"77","endLine":7,"endColumn":17},"no-native-reassign",["104"],"no-negated-in-lhs",["105"],"no-unused-vars","'useRef' is defined but never used.","Identifier","unusedVar","dot-location","Expected dot to be on same line as property.","MemberExpression","expectedDotBeforeProperty",{"range":"106","text":"107"},"default-case","Expected a default case.","SwitchStatement","missingDefaultCase",{"range":"108","text":"107"},"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'authListener'. Either include it or remove the dependency array.","ArrayExpression",["109"],"'isRegistered' is assigned a value but never used.","'setisRegistered' is assigned a value but never used.","'email' is assigned a value but never used.","'password' is assigned a value but never used.","'handleSignup' is assigned a value but never used.","'FaFacebookSquare' is defined but never used.","'isLoggedIn' is assigned a value but never used.","'hasAccount' is assigned a value but never used.","'sethasAccount' is assigned a value but never used.","'user' is assigned a value but never used.","'setisLoggedIn' is assigned a value but never used.","'setuser' is assigned a value but never used.","no-global-assign","no-unsafe-negation",[985,993],"\n .",[1458,1466],{"desc":"110","fix":"111"},"Update the dependencies array to be: [authListener]",{"range":"112","text":"113"},[2212,2214],"[authListener]"]