-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintcache
1 lines (1 loc) · 6.09 KB
/
.eslintcache
1
[{"C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\index.js":"1","C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\context\\AppReducer.js":"2","C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\context\\GlobalState.js":"3","C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\App.js":"4","C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\GlobalStyles.js":"5","C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\Header.js":"6","C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\Search.js":"7","C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\api.js":"8","C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\Jobs.js":"9","C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\JobCard.js":"10","C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\Loader.js":"11"},{"size":405,"mtime":1606603772559,"results":"12","hashOfConfig":"13"},{"size":615,"mtime":1606655949226,"results":"14","hashOfConfig":"13"},{"size":439,"mtime":1606603888040,"results":"15","hashOfConfig":"13"},{"size":367,"mtime":1606652733246,"results":"16","hashOfConfig":"13"},{"size":1211,"mtime":1606651742161,"results":"17","hashOfConfig":"13"},{"size":466,"mtime":1606614951908,"results":"18","hashOfConfig":"13"},{"size":4159,"mtime":1606656340400,"results":"19","hashOfConfig":"13"},{"size":148,"mtime":1606653275399,"results":"20","hashOfConfig":"13"},{"size":1179,"mtime":1606656321842,"results":"21","hashOfConfig":"13"},{"size":1221,"mtime":1606655371118,"results":"22","hashOfConfig":"13"},{"size":1079,"mtime":1606656141960,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"p25674",{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"41","messages":"42","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"43"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\index.js",[],"C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\context\\AppReducer.js",[],"C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\context\\GlobalState.js",[],["48","49"],"C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\App.js",[],"C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\GlobalStyles.js",[],"C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\Header.js",[],"C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\Search.js",["50","51","52","53"],"C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\api.js",[],"C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\Jobs.js",["54"],"import axios from 'axios';\r\nimport React, { useEffect } from 'react';\r\nimport styled from 'styled-components';\r\nimport { API_URL } from '../api';\r\nimport { useGlobalValue } from '../context/GlobalState';\r\nimport JobCard from './JobCard';\r\nimport Loader from './Loader';\r\n\r\nconst Jobs = () => {\r\n\tconst [{ jobs, searchJobs, loading }, dispatch] = useGlobalValue();\r\n\r\n\tconst fetchJobs = async () => {\r\n\t\ttry {\r\n\t\t\tdispatch({ type: 'FETCH_JOBS_REQUEST' });\r\n\t\t\tconst jobsData = await axios\r\n\t\t\t\t.get(`${API_URL}description=react&full_time=false&location=`)\r\n\t\t\t\t.then((response) => response.data);\r\n\t\t\tdispatch({ type: 'FETCH_JOBS', payload: jobsData });\r\n\t\t} catch (error) {\r\n\t\t\tconsole.log(error.message);\r\n\t\t}\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tfetchJobs();\r\n\t}, [dispatch]);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{loading ? <Loader /> : null}\r\n\t\t\t<JobsGrid>\r\n\t\t\t\t{searchJobs.length > 0 && searchJobs.map((job) => <JobCard job={job} />)}\r\n\t\t\t\t{jobs.length > 0 && jobs.map((job) => <JobCard job={job} />)}\r\n\t\t\t</JobsGrid>\r\n\t\t</>\r\n\t);\r\n};\r\n\r\nconst JobsGrid = styled.div`\r\n\tdisplay: grid;\r\n\tgrid-template-columns: repeat(3, 1fr);\r\n\tgrid-gap: 15px;\r\n\tpadding-bottom: 80px;\r\n`;\r\n\r\nexport default Jobs;\r\n","C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\JobCard.js",[],"C:\\Users\\Said-Dev\\Desktop\\dev-jobs\\src\\components\\Loader.js",[],{"ruleId":"55","replacedBy":"56"},{"ruleId":"57","replacedBy":"58"},{"ruleId":"59","severity":1,"message":"60","line":10,"column":9,"nodeType":"61","messageId":"62","endLine":10,"endColumn":11},{"ruleId":"63","severity":1,"message":"64","line":30,"column":13,"nodeType":"65","messageId":"62","endLine":30,"endColumn":15},{"ruleId":"63","severity":1,"message":"64","line":30,"column":31,"nodeType":"65","messageId":"62","endLine":30,"endColumn":33},{"ruleId":"63","severity":1,"message":"64","line":30,"column":48,"nodeType":"65","messageId":"62","endLine":30,"endColumn":50},{"ruleId":"66","severity":1,"message":"67","line":26,"column":5,"nodeType":"68","endLine":26,"endColumn":15,"suggestions":"69"},"no-native-reassign",["70"],"no-negated-in-lhs",["71"],"no-empty-pattern","Unexpected empty object pattern.","ObjectPattern","unexpected","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'fetchJobs'. Either include it or remove the dependency array.","ArrayExpression",["72"],"no-global-assign","no-unsafe-negation",{"desc":"73","fix":"74"},"Update the dependencies array to be: [dispatch, fetchJobs]",{"range":"75","text":"76"},[759,769],"[dispatch, fetchJobs]"]