-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 8.68 KB
/
.eslintcache
1
[{"/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/reportWebVitals.js":"1","/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/App.js":"2","/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/components/Numbers.js":"3","/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/components/Germany.js":"4","/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/components/News.js":"5","/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/components/Menu.js":"6","/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/index.js":"7"},{"size":362,"mtime":1606382109987,"results":"8","hashOfConfig":"9"},{"size":887,"mtime":1606494577216,"results":"10","hashOfConfig":"9"},{"size":1183,"mtime":1606386673197,"results":"11","hashOfConfig":"9"},{"size":1552,"mtime":1626284990103,"results":"12","hashOfConfig":"9"},{"size":2557,"mtime":1606675970952,"results":"13","hashOfConfig":"9"},{"size":842,"mtime":1606918158886,"results":"14","hashOfConfig":"9"},{"size":500,"mtime":1606382109986,"results":"15","hashOfConfig":"9"},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"tvk8ze",{"filePath":"18","messages":"19","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"20"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"23","messages":"24","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"25","messages":"26","errorCount":0,"warningCount":8,"fixableErrorCount":0,"fixableWarningCount":0,"source":"27"},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/reportWebVitals.js",[],"/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/App.js",["32","33"],"import logo from './logo.svg';\nimport './App.css';\nimport {useState} from 'react';\nimport { BrowserRouter, Route, Switch } from 'react-router-dom';\nimport Numbers from './components/Numbers';\nimport News from './components/News';\nimport Germany from './components/Germany';\nimport Menu from './components/Menu';\n\n\n\n\nfunction App() {\n //const [ dir, setDir ] = useState(0);\n var menuDir = 4;\n\nconst changeDir= (number) => {\n //setDir(number);\n menuDir = number;\n \n}\n\nconsole.log(menuDir);\n\n return (\n <div className=\"App\">\n <BrowserRouter>\n <Switch>\n <Route path=\"/covid-19/\" component={Numbers} exact />\n <Route path=\"/covid-19/news\" component={News} />\n <Route path=\"/covid-19/germany\" component={Germany} />\n </Switch>\n <Menu dir={menuDir} change={(e) => changeDir(e)}/>\n </BrowserRouter>\n \n </div>\n );\n}\n\nexport default App;\n","/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/components/Numbers.js",["34","35","36"],"/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/components/Germany.js",["37","38","39"],"/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/components/News.js",["40","41","42","43","44","45","46","47"],"import React from 'react';\nimport {useState, useEffect} from 'react';\nimport axios from 'axios';\nimport styled from 'styled-components'\nimport loading from './assets/loading.png'\n\nconst NewsCard = styled.div`\n flex: 0 0 30%;\n margin-right: 3rem;\n background: #222C38;\n`;\n\nconst onWheel = e => {\n e.preventDefault();\n const container = document.getElementById(\"container\");\n const containerScrollPosition = document.getElementById(\"container\").scrollLeft;\n container.scrollTo({\n top: 0,\n left: containerScrollPosition + e.deltaY,\n behaviour: \"smooth\"\n });\n };\n\nfunction News() {\n const [error, setError] = useState(null);\n const [isLoaded, setIsLoaded] = useState(false);\n const [items, setItems] = useState([]);\n \n const [appState, setAppState] = useState({\n loading: null,\n repos: 0,\n });\n \n useEffect(() => {\n setAppState({ loading: true });\n const apiUrl = 'https://gnews.io/api/v4/search?q=corona&lang=de&token=7e1140834e066608272e30de241a65ad';\n axios.get(apiUrl).then((repos) => {\n const allRepos = repos.data;\n setItems( allRepos.articles );\n console.log(allRepos);\n });\n }, [setAppState]);\n\n \n console.log(items);\n \n \n return( <div className=\"news\">\n <div className=\"headline\">\n <h1>Corona</h1>\n <h2>News</h2>\n </div>\n <div className=\"newsCards\" onWheel={onWheel} id=\"container\">\n {items.length < 1 ? <img src={loading} className=\"loading\"/> : \n items.map((news, key) =>\n <NewsCard className=\"card\">\n <div className=\"c-img\">\n <img src={news.image} />\n </div>\n <h4>{news.title}</h4>\n <p>{news.content.slice(0,220)}</p>\n <div className=\"lower\">\n <div>\n <p>Datum: {news.publishedAt.slice(0,10)}</p>\n <p>Quelle: {news.source.name}</p>\n </div>\n <div>\n <a href={news.url} target=\"_blank\">weiter lesen</a>\n </div>\n </div>\n </NewsCard>\n )\n }\n </div>\n </div>\n )\n \n}\n \nexport default News;","/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/components/Menu.js",[],"/Users/AaronJoelKaemmerer-Karsten/react-corona/corona/src/index.js",[],{"ruleId":"48","severity":1,"message":"49","line":1,"column":8,"nodeType":"50","messageId":"51","endLine":1,"endColumn":12},{"ruleId":"48","severity":1,"message":"52","line":3,"column":9,"nodeType":"50","messageId":"51","endLine":3,"endColumn":17},{"ruleId":"48","severity":1,"message":"53","line":8,"column":10,"nodeType":"50","messageId":"51","endLine":8,"endColumn":15},{"ruleId":"48","severity":1,"message":"54","line":9,"column":10,"nodeType":"50","messageId":"51","endLine":9,"endColumn":18},{"ruleId":"48","severity":1,"message":"55","line":10,"column":10,"nodeType":"50","messageId":"51","endLine":10,"endColumn":15},{"ruleId":"48","severity":1,"message":"56","line":3,"column":8,"nodeType":"50","messageId":"51","endLine":3,"endColumn":15},{"ruleId":"48","severity":1,"message":"53","line":8,"column":10,"nodeType":"50","messageId":"51","endLine":8,"endColumn":15},{"ruleId":"48","severity":1,"message":"54","line":9,"column":10,"nodeType":"50","messageId":"51","endLine":9,"endColumn":18},{"ruleId":"48","severity":1,"message":"53","line":25,"column":12,"nodeType":"50","messageId":"51","endLine":25,"endColumn":17},{"ruleId":"48","severity":1,"message":"57","line":25,"column":19,"nodeType":"50","messageId":"51","endLine":25,"endColumn":27},{"ruleId":"48","severity":1,"message":"54","line":26,"column":12,"nodeType":"50","messageId":"51","endLine":26,"endColumn":20},{"ruleId":"48","severity":1,"message":"58","line":26,"column":22,"nodeType":"50","messageId":"51","endLine":26,"endColumn":33},{"ruleId":"48","severity":1,"message":"59","line":29,"column":12,"nodeType":"50","messageId":"51","endLine":29,"endColumn":20},{"ruleId":"60","severity":1,"message":"61","line":54,"column":33,"nodeType":"62","endLine":54,"endColumn":73},{"ruleId":"60","severity":1,"message":"61","line":58,"column":29,"nodeType":"62","endLine":58,"endColumn":53},{"ruleId":"63","severity":1,"message":"64","line":68,"column":52,"nodeType":"65","endLine":68,"endColumn":67},"no-unused-vars","'logo' is defined but never used.","Identifier","unusedVar","'useState' is defined but never used.","'error' is assigned a value but never used.","'isLoaded' is assigned a value but never used.","'items' is assigned a value but never used.","'loading' is defined but never used.","'setError' is assigned a value but never used.","'setIsLoaded' is assigned a value but never used.","'appState' is assigned a value but never used.","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","react/jsx-no-target-blank","Using target=\"_blank\" without rel=\"noreferrer\" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener","JSXAttribute"]