diff --git a/.eslintcache b/.eslintcache deleted file mode 100644 index d837591..0000000 --- a/.eslintcache +++ /dev/null @@ -1 +0,0 @@ -[{"/Users/griggs/Projects/timetoherd/src/index.js":"1","/Users/griggs/Projects/timetoherd/src/App.js":"2","/Users/griggs/Projects/timetoherd/src/reportWebVitals.js":"3","/Users/griggs/Projects/timetoherd/src/shared/tools.js":"4","/Users/griggs/Projects/timetoherd/src/components/map-chart/map-chart.js":"5","/Users/griggs/Projects/timetoherd/src/shared/data-factory.js":"6","/Users/griggs/Projects/timetoherd/src/components/country-dropdown/country-dropdown.js":"7","/Users/griggs/Projects/timetoherd/src/components/countries-table/countries-table.js":"8","/Users/griggs/Projects/timetoherd/src/components/methodology/methodology.js":"9","/Users/griggs/Projects/timetoherd/src/components/supporters/supporters.js":"10","/Users/griggs/Projects/timetoherd/src/components/social-sharing/social-sharing-button.js":"11","/Users/griggs/Projects/timetoherd/src/components/time-to-herd/time-to-herd.jsx":"12"},{"size":500,"mtime":1609547221881,"results":"13","hashOfConfig":"14"},{"size":9809,"mtime":1610150424327,"results":"15","hashOfConfig":"14"},{"size":362,"mtime":1609547221882,"results":"16","hashOfConfig":"14"},{"size":220,"mtime":1609650238886,"results":"17","hashOfConfig":"14"},{"size":3625,"mtime":1609995037941,"results":"18","hashOfConfig":"14"},{"size":4392,"mtime":1610020139848,"results":"19","hashOfConfig":"14"},{"size":2036,"mtime":1610065542914,"results":"20","hashOfConfig":"14"},{"size":4073,"mtime":1609807264857,"results":"21","hashOfConfig":"14"},{"size":4757,"mtime":1610071294975,"results":"22","hashOfConfig":"14"},{"size":1815,"mtime":1610069382205,"results":"23","hashOfConfig":"14"},{"size":1900,"mtime":1609994084202,"results":"24","hashOfConfig":"14"},{"size":5700,"mtime":1610065960335,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},"1166t7y",{"filePath":"29","messages":"30","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"35","usedDeprecatedRules":"36"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"47","messages":"48","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/griggs/Projects/timetoherd/src/index.js",[],["53","54"],"/Users/griggs/Projects/timetoherd/src/App.js",["55","56"],"/Users/griggs/Projects/timetoherd/src/reportWebVitals.js",[],"/Users/griggs/Projects/timetoherd/src/shared/tools.js",["57"],"import React from \"react\";\n\nexport const parseDate = (str) => {\n var mdy = str.split(\"-\");\n return new Date(mdy[2], mdy[0] - 1, mdy[1]);\n};\n\nexport const numberWithCommas = (x) => {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n};\n",["58","59"],"/Users/griggs/Projects/timetoherd/src/components/map-chart/map-chart.js",[],"/Users/griggs/Projects/timetoherd/src/shared/data-factory.js",[],"/Users/griggs/Projects/timetoherd/src/components/country-dropdown/country-dropdown.js",[],"/Users/griggs/Projects/timetoherd/src/components/countries-table/countries-table.js",[],"/Users/griggs/Projects/timetoherd/src/components/methodology/methodology.js",["60","61","62","63"],"/Users/griggs/Projects/timetoherd/src/components/supporters/supporters.js",["64","65","66","67","68"],"/Users/griggs/Projects/timetoherd/src/components/social-sharing/social-sharing-button.js",[],"/Users/griggs/Projects/timetoherd/src/components/time-to-herd/time-to-herd.jsx",[],{"ruleId":"69","replacedBy":"70"},{"ruleId":"71","replacedBy":"72"},{"ruleId":"73","severity":1,"message":"74","line":198,"column":29,"nodeType":"75","messageId":"76","endLine":198,"endColumn":50},{"ruleId":"77","severity":1,"message":"78","line":226,"column":17,"nodeType":"79","endLine":230,"endColumn":18},{"ruleId":"80","severity":1,"message":"81","line":1,"column":8,"nodeType":"82","messageId":"83","endLine":1,"endColumn":13},{"ruleId":"69","replacedBy":"84"},{"ruleId":"71","replacedBy":"85"},{"ruleId":"77","severity":1,"message":"78","line":15,"column":13,"nodeType":"79","endLine":18,"endColumn":14},{"ruleId":"77","severity":1,"message":"78","line":62,"column":13,"nodeType":"79","endLine":65,"endColumn":14},{"ruleId":"77","severity":1,"message":"78","line":95,"column":13,"nodeType":"79","endLine":98,"endColumn":14},{"ruleId":"77","severity":1,"message":"78","line":107,"column":13,"nodeType":"79","endLine":107,"endColumn":81},{"ruleId":"77","severity":1,"message":"78","line":12,"column":13,"nodeType":"79","endLine":16,"endColumn":14},{"ruleId":"77","severity":1,"message":"78","line":21,"column":13,"nodeType":"79","endLine":21,"endColumn":58},{"ruleId":"77","severity":1,"message":"78","line":33,"column":13,"nodeType":"79","endLine":33,"endColumn":67},{"ruleId":"77","severity":1,"message":"78","line":42,"column":13,"nodeType":"79","endLine":46,"endColumn":14},{"ruleId":"77","severity":1,"message":"78","line":54,"column":13,"nodeType":"79","endLine":58,"endColumn":14},"no-native-reassign",["86"],"no-negated-in-lhs",["87"],"use-isnan","Use the isNaN function to compare with NaN.","BinaryExpression","comparisonWithNaN","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","JSXOpeningElement","no-unused-vars","'React' is defined but never used.","Identifier","unusedVar",["86"],["87"],"no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4d29575..d7b8f1b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +.eslintcache diff --git a/src/App.js b/src/App.js index 28d46e3..cbd1cf9 100644 --- a/src/App.js +++ b/src/App.js @@ -47,7 +47,6 @@ export default function App() { "https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/vaccinations/vaccinations.csv", { complete: (results) => { - console.log(results.data); return setAllVaccineData(results.data); }, } @@ -118,7 +117,7 @@ export default function App() { /> -  days{" "} + {" "}days{" "} -

+

until

herd immunity to Covid-19

{" "} is reached through vaccinations in{" "} @@ -138,7 +137,7 @@ export default function App() { setSelectedCountry={setSelectedCountry} /> -

+
*at current daily vaccination rates @@ -195,7 +194,7 @@ export default function App() { value={herdImmunityThresholdPercentage} onChange={(valueAsNumber) => { if ( - valueAsNumber === NaN || + isNaN(valueAsNumber) || valueAsNumber > 95 || valueAsNumber < 50 ) { @@ -224,7 +223,7 @@ export default function App() { selectedCountry={selectedCountry} /> - Supported by   + Supported by {" "} diff --git a/src/components/time-to-herd/time-to-herd.jsx b/src/components/time-to-herd/time-to-herd.jsx index 86d7c6a..378e407 100644 --- a/src/components/time-to-herd/time-to-herd.jsx +++ b/src/components/time-to-herd/time-to-herd.jsx @@ -98,7 +98,6 @@ export const TimeToHerdCount = ({ vaccineDosesDelivered, dailyVaccinationRate ) => { - console.log("threshold " + herdImmunnityVaccinationThreshold); let daysRounded = Math.round( (herdImmunnityVaccinationThreshold - vaccineDosesDelivered) / dailyVaccinationRate