forked from echen831/MB_SJHackathon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
225 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"/Users/ericchen/Desktop/MB_projects/sj_project/src/index.js":"1","/Users/ericchen/Desktop/MB_projects/sj_project/src/App.js":"2","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/input.jsx":"3","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/states.js":"4","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/buttons.jsx":"5","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/today.jsx":"6","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/history.jsx":"7"},{"size":199,"mtime":1607224861875,"results":"8","hashOfConfig":"9"},{"size":1193,"mtime":1607386750633,"results":"10","hashOfConfig":"9"},{"size":766,"mtime":1607227340486,"results":"11","hashOfConfig":"9"},{"size":5659,"mtime":1607320414068,"results":"12","hashOfConfig":"9"},{"size":816,"mtime":1607407453938,"results":"13","hashOfConfig":"9"},{"size":2131,"mtime":1607325725948,"results":"14","hashOfConfig":"9"},{"size":716,"mtime":1607406659266,"results":"15","hashOfConfig":"9"},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"18"},"150614y",{"filePath":"19","messages":"20","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"21","messages":"22","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"23","usedDeprecatedRules":"24"},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"18"},{"filePath":"27","messages":"28","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"18"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ericchen/Desktop/MB_projects/sj_project/src/index.js",[],["33","34"],"/Users/ericchen/Desktop/MB_projects/sj_project/src/App.js",["35"],"/Users/ericchen/Desktop/MB_projects/sj_project/src/components/input.jsx",["36","37"],"import React, { useState, useRef } from 'react';\n\nexport const Input = ({ add }) => {\n const [name, setName] = useState('');\n\n const nameInput = useRef();\n const addressInput = useRef();\n\n const handleSubmit = (e) => {\n e.preventDefault();\n add({ name: nameInput.current.value, address: addressInput.current.value })\n nameInput.current.value = '';\n addressInput.current.value = '';\n }\n\n return (\n <div>\n <form action=\"\" onSubmit={handleSubmit}>\n <input type=\"text\" placeholder='Your name here...' ref={nameInput}/>\n <input type=\"text\" placeholder='Your address here...'ref={addressInput}/>\n <button>Submit</button>\n </form>\n </div>\n )\n}",["38","39"],"/Users/ericchen/Desktop/MB_projects/sj_project/src/components/states.js",[],"/Users/ericchen/Desktop/MB_projects/sj_project/src/components/buttons.jsx",["40","41"],"/Users/ericchen/Desktop/MB_projects/sj_project/src/components/today.jsx",[],"/Users/ericchen/Desktop/MB_projects/sj_project/src/components/history.jsx",[],{"ruleId":"42","replacedBy":"43"},{"ruleId":"44","replacedBy":"45"},{"ruleId":"46","severity":1,"message":"47","line":17,"column":48,"nodeType":"48","endLine":17,"endColumn":50,"suggestions":"49"},{"ruleId":"50","severity":1,"message":"51","line":4,"column":12,"nodeType":"52","messageId":"53","endLine":4,"endColumn":16},{"ruleId":"50","severity":1,"message":"54","line":4,"column":18,"nodeType":"52","messageId":"53","endLine":4,"endColumn":25},{"ruleId":"42","replacedBy":"55"},{"ruleId":"44","replacedBy":"56"},{"ruleId":"50","severity":1,"message":"57","line":1,"column":16,"nodeType":"52","messageId":"53","endLine":1,"endColumn":24},{"ruleId":"50","severity":1,"message":"58","line":1,"column":26,"nodeType":"52","messageId":"53","endLine":1,"endColumn":35},"no-native-reassign",["59"],"no-negated-in-lhs",["60"],"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'currState'. Either include it or remove the dependency array.","ArrayExpression",["61"],"no-unused-vars","'name' is assigned a value but never used.","Identifier","unusedVar","'setName' is assigned a value but never used.",["59"],["60"],"'useState' is defined but never used.","'useEffect' is defined but never used.","no-global-assign","no-unsafe-negation",{"desc":"62","fix":"63"},"Update the dependencies array to be: [currState]",{"range":"64","text":"65"},[495,497],"[currState]"] | ||
[{"/Users/ericchen/Desktop/MB_projects/sj_project/src/index.js":"1","/Users/ericchen/Desktop/MB_projects/sj_project/src/App.js":"2","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/input.jsx":"3","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/states.js":"4","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/buttons.jsx":"5","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/today.jsx":"6","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/history.jsx":"7"},{"size":199,"mtime":1607224861875,"results":"8","hashOfConfig":"9"},{"size":1193,"mtime":1607386750633,"results":"10","hashOfConfig":"9"},{"size":766,"mtime":1607227340486,"results":"11","hashOfConfig":"9"},{"size":5659,"mtime":1607320414068,"results":"12","hashOfConfig":"9"},{"size":816,"mtime":1607407453938,"results":"13","hashOfConfig":"9"},{"size":2131,"mtime":1607325725948,"results":"14","hashOfConfig":"9"},{"size":1085,"mtime":1607408305453,"results":"15","hashOfConfig":"9"},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"18"},"150614y",{"filePath":"19","messages":"20","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"21","usedDeprecatedRules":"18"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"24","usedDeprecatedRules":"25"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"18"},{"filePath":"28","messages":"29","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"30","usedDeprecatedRules":"18"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"18"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/Users/ericchen/Desktop/MB_projects/sj_project/src/index.js",[],["35","36"],"/Users/ericchen/Desktop/MB_projects/sj_project/src/App.js",["37"],"import React, { useState, useEffect } from 'react';\n\nimport './App.css';\nimport { Today } from './components/today';\nimport { History } from './components/history'\nimport { Buttons } from './components/buttons';\n\n\nconst App = () => {\n\n const [currState, setCurrState] = useState('CA');\n const [isHistLoaded, setHistIsLoaded] = useState(false);\n const [histError, setHistError] = useState(null);\n const [histData, setHistdata] = useState([]);\n\n\n useEffect(() => { fetchHistData(currState)}, [])\n\n const fetchHistData = (state) => {\n setHistIsLoaded(false);\n fetch(`https://api.covidtracking.com/v1/states/${state}/daily.json`)\n .then(res => res.json())\n .then((result) => {\n setHistIsLoaded(true);\n setHistdata(result);\n },\n (error) => {\n setHistIsLoaded(true);\n setHistError(error)\n }\n )\n }\n\n \n return (\n <div className=\"App\">\n MB Social Justice Hackathon\n <Buttons currState={currState} setCurrState={setCurrState} fetchHistData={fetchHistData}/>\n <Today currState={currState}/>\n <History data={histData} isLoaded={isHistLoaded} error={histError}/>\n </div>\n );\n}\n\nexport default App;\n","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/input.jsx",["38","39"],"import React, { useState, useRef } from 'react';\n\nexport const Input = ({ add }) => {\n const [name, setName] = useState('');\n\n const nameInput = useRef();\n const addressInput = useRef();\n\n const handleSubmit = (e) => {\n e.preventDefault();\n add({ name: nameInput.current.value, address: addressInput.current.value })\n nameInput.current.value = '';\n addressInput.current.value = '';\n }\n\n return (\n <div>\n <form action=\"\" onSubmit={handleSubmit}>\n <input type=\"text\" placeholder='Your name here...' ref={nameInput}/>\n <input type=\"text\" placeholder='Your address here...'ref={addressInput}/>\n <button>Submit</button>\n </form>\n </div>\n )\n}",["40","41"],"/Users/ericchen/Desktop/MB_projects/sj_project/src/components/states.js",[],"/Users/ericchen/Desktop/MB_projects/sj_project/src/components/buttons.jsx",["42","43"],"import React, {useState, useEffect} from 'react';\nimport { STATES } from './states'\n\nconst COLORS = ['red', 'blue', 'green', 'orange', 'purple', 'gold', 'indigo', 'brown']\n\nexport const Buttons = ({ setCurrState, fetchHistData }) => {\n\n return (\n <div>\n <ul className='button-wrapper'>\n {STATES.map((state, idx) => (\n <li key={state.abbreviation}\n style={{color: 'white', backgroundColor: COLORS[idx % COLORS.length]}}\n className='button'\n onClick={() => {setCurrState(state.abbreviation); \n fetchHistData(state.abbreviation.toLowerCase())}}>\n {state.abbreviation}</li>\n ))}\n </ul>\n </div>\n )\n}","/Users/ericchen/Desktop/MB_projects/sj_project/src/components/today.jsx",[],"/Users/ericchen/Desktop/MB_projects/sj_project/src/components/history.jsx",["44"],{"ruleId":"45","replacedBy":"46"},{"ruleId":"47","replacedBy":"48"},{"ruleId":"49","severity":1,"message":"50","line":17,"column":48,"nodeType":"51","endLine":17,"endColumn":50,"suggestions":"52"},{"ruleId":"53","severity":1,"message":"54","line":4,"column":12,"nodeType":"55","messageId":"56","endLine":4,"endColumn":16},{"ruleId":"53","severity":1,"message":"57","line":4,"column":18,"nodeType":"55","messageId":"56","endLine":4,"endColumn":25},{"ruleId":"45","replacedBy":"58"},{"ruleId":"47","replacedBy":"59"},{"ruleId":"53","severity":1,"message":"60","line":1,"column":16,"nodeType":"55","messageId":"56","endLine":1,"endColumn":24},{"ruleId":"53","severity":1,"message":"61","line":1,"column":26,"nodeType":"55","messageId":"56","endLine":1,"endColumn":35},{"ruleId":"53","severity":1,"message":"62","line":3,"column":20,"nodeType":"55","messageId":"56","endLine":3,"endColumn":24},"no-native-reassign",["63"],"no-negated-in-lhs",["64"],"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'currState'. Either include it or remove the dependency array.","ArrayExpression",["65"],"no-unused-vars","'name' is assigned a value but never used.","Identifier","unusedVar","'setName' is assigned a value but never used.",["63"],["64"],"'useState' is defined but never used.","'useEffect' is defined but never used.","'Cell' is defined but never used.","no-global-assign","no-unsafe-negation",{"desc":"66","fix":"67"},"Update the dependencies array to be: [currState]",{"range":"68","text":"69"},[495,497],"[currState]"] |
Oops, something went wrong.