-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 9.06 KB
/
.eslintcache
1
[{"/home/prashant-bajaj/Desktop/zhyffi-task/src/index.js":"1","/home/prashant-bajaj/Desktop/zhyffi-task/src/App.js":"2","/home/prashant-bajaj/Desktop/zhyffi-task/src/LoginBox.js":"3","/home/prashant-bajaj/Desktop/zhyffi-task/src/SignUp.js":"4","/home/prashant-bajaj/Desktop/zhyffi-task/src/LoginLayout.js":"5","/home/prashant-bajaj/Desktop/zhyffi-task/src/Login.js":"6","/home/prashant-bajaj/Desktop/zhyffi-task/src/FormInput.js":"7","/home/prashant-bajaj/Desktop/zhyffi-task/src/formValidation.js":"8","/home/prashant-bajaj/Desktop/zhyffi-task/src/Navbar.js":"9","/home/prashant-bajaj/Desktop/zhyffi-task/src/Home.js":"10","/home/prashant-bajaj/Desktop/zhyffi-task/src/Hero.js":"11","/home/prashant-bajaj/Desktop/zhyffi-task/src/Carousel.js":"12","/home/prashant-bajaj/Desktop/zhyffi-task/src/dummyData.js":"13","/home/prashant-bajaj/Desktop/zhyffi-task/src/DataLayer.js":"14","/home/prashant-bajaj/Desktop/zhyffi-task/src/reducer.js":"15"},{"size":295,"mtime":1611173432677,"results":"16","hashOfConfig":"17"},{"size":393,"mtime":1611216111358,"results":"18","hashOfConfig":"17"},{"size":463,"mtime":1610978882237,"results":"19","hashOfConfig":"17"},{"size":3571,"mtime":1611216297608,"results":"20","hashOfConfig":"17"},{"size":509,"mtime":1611073370266,"results":"21","hashOfConfig":"17"},{"size":3414,"mtime":1611216719604,"results":"22","hashOfConfig":"17"},{"size":501,"mtime":1610974800326,"results":"23","hashOfConfig":"17"},{"size":509,"mtime":1610978456052,"results":"24","hashOfConfig":"17"},{"size":3562,"mtime":1611216729820,"results":"25","hashOfConfig":"17"},{"size":726,"mtime":1611216269855,"results":"26","hashOfConfig":"17"},{"size":525,"mtime":1611016200109,"results":"27","hashOfConfig":"17"},{"size":1718,"mtime":1611071428896,"results":"28","hashOfConfig":"17"},{"size":1769,"mtime":1611067550339,"results":"29","hashOfConfig":"17"},{"size":423,"mtime":1611173362348,"results":"30","hashOfConfig":"17"},{"size":544,"mtime":1611177990248,"results":"31","hashOfConfig":"17"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"14wa6lo",{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"39","messages":"40","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"41","usedDeprecatedRules":"36"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"48"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"51"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"58"},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"63"},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"51"},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/prashant-bajaj/Desktop/zhyffi-task/src/index.js",[],"/home/prashant-bajaj/Desktop/zhyffi-task/src/App.js",[],["68"],"/home/prashant-bajaj/Desktop/zhyffi-task/src/LoginBox.js",[],"/home/prashant-bajaj/Desktop/zhyffi-task/src/SignUp.js",["69"],"import React, { useState } from \"react\";\nimport { Link, navigate } from \"@reach/router\";\nimport LoginLayout from \"./LoginLayout\";\nimport FormInput from \"./FormInput\";\nimport { emailValidation } from \"./formValidation\";\n\nfunction SignUp() {\n const [name, setName] = useState({\n value: \"\",\n error: \"\",\n });\n const [email, setEmail] = useState({\n value: \"\",\n error: \"\",\n });\n const [password, setPassword] = useState({\n value: \"\",\n error: \"\",\n });\n const [error, setError] = useState(\"\");\n // eslint-disable-next-line\n const [file, setFile] = useState(null);\n\n const ManageInput = (e, setInput, type) => {\n setError(\"\");\n if (type === \"email\" && emailValidation(e.target.value) !== \"OK\") {\n setInput({ value: e.target.vale, error: \"fill your email properly\" });\n } else if (e.target.value !== \"\") {\n setInput({ value: e.target.value, error: \"\" });\n } else {\n setInput({ value: \"\", error: `${type} field should not be empty` });\n }\n };\n\n const errorValidation = () => {\n if (\n emailValidation(email.value) === \"OK\" &&\n name.value !== \"\" &&\n password.value !== \"\" &&\n file !== null\n ) {\n return true;\n } else {\n return false;\n }\n };\n\n const handleFileInput = (e) => {\n setFile({ image: e.target.files[0] });\n };\n\n const handleSignup = (e) => {\n e.preventDefault();\n setError(\"\");\n\n if (errorValidation()) {\n const formData = new FormData(e.target);\n formData.append(\"primary_img\", file.image);\n\n fetch(\"http://localhost:5000/register\", {\n method: \"POST\",\n body: formData,\n })\n .then((response) => response.json())\n .then((response) => {\n if (response.success === true) {\n navigate(\"/login\");\n } else {\n setError(response.msg);\n }\n })\n .catch((err) => {\n console.log(err);\n setError(\"there was some error\");\n });\n } else {\n setError(\"fill all the fields correctly\");\n }\n };\n\n return (\n <LoginLayout>\n <h5 className=\"log-head\">Sign Up</h5>\n <p>\n Already have account? <Link to=\"/login\">Login</Link>\n </p>\n <form onSubmit={(e) => handleSignup(e)} encType=\"multipart/form-data\">\n <FormInput\n name=\"name\"\n type=\"name\"\n value={name.value}\n error={name.error}\n changeMe={(e) => ManageInput(e, setName, \"name\")}\n >\n Name\n </FormInput>\n <FormInput\n name=\"email\"\n type=\"email\"\n value={email.value}\n error={email.error}\n changeMe={(e) => ManageInput(e, setEmail, \"email\")}\n >\n Email\n </FormInput>\n <FormInput\n name=\"password\"\n type=\"password\"\n value={password.value}\n error={password.error}\n changeMe={(e) => ManageInput(e, setPassword, \"password\")}\n >\n Password\n </FormInput>\n\n <div className=\"form-input\">\n <label htmlFor=\"primary_img\">Image</label>\n <input\n className=\"input-file\"\n type=\"file\"\n value={file ? file.name : null}\n onChange={handleFileInput}\n />\n </div>\n\n <p className=\"error-message\">{error}</p>\n\n <button\n type=\"submit\"\n disabled={\n name.value === \"\" || email.value === \"\" || password.value === \"\"\n }\n >\n SignUp\n </button>\n </form>\n </LoginLayout>\n );\n}\n\nexport default SignUp;\n","/home/prashant-bajaj/Desktop/zhyffi-task/src/LoginLayout.js",[],"/home/prashant-bajaj/Desktop/zhyffi-task/src/Login.js",["70"],"/home/prashant-bajaj/Desktop/zhyffi-task/src/FormInput.js",[],["71"],"/home/prashant-bajaj/Desktop/zhyffi-task/src/formValidation.js",[],["72"],"/home/prashant-bajaj/Desktop/zhyffi-task/src/Navbar.js",[],"/home/prashant-bajaj/Desktop/zhyffi-task/src/Home.js",[],"/home/prashant-bajaj/Desktop/zhyffi-task/src/Hero.js",[],["73"],"/home/prashant-bajaj/Desktop/zhyffi-task/src/Carousel.js",[],"/home/prashant-bajaj/Desktop/zhyffi-task/src/dummyData.js",[],["74"],"/home/prashant-bajaj/Desktop/zhyffi-task/src/DataLayer.js",[],"/home/prashant-bajaj/Desktop/zhyffi-task/src/reducer.js",[],{"ruleId":"75","replacedBy":"76"},{"ruleId":"77","severity":1,"message":"78","line":73,"column":11,"nodeType":"79","messageId":"80","endLine":73,"endColumn":22},{"ruleId":"77","severity":1,"message":"78","line":85,"column":11,"nodeType":"79","messageId":"80","endLine":85,"endColumn":22},{"ruleId":"75","replacedBy":"81"},{"ruleId":"75","replacedBy":"82"},{"ruleId":"75","replacedBy":"83"},{"ruleId":"75","replacedBy":"84"},"jsx-a11y/accessible-emoji",[],"no-console","Unexpected console statement.","MemberExpression","unexpected",[],[],[],[]]