-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
1 parent
2f8be4f
commit 2bb7f71
Showing
6 changed files
with
156 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { fetchCSV } from "macro:fetchCSV"; | ||
|
||
export const Covid19 = () => { | ||
const rows = fetchCSV( | ||
"https://covid19.who.int/WHO-COVID-19-global-data.csv", | ||
{ | ||
last: 100, | ||
columns: ["New_cases", "Date_reported", "Country"], | ||
} | ||
); | ||
|
||
return ( | ||
<div> | ||
<h2>Covid-19</h2> | ||
<h6>last {rows.length} updates from the WHO</h6> | ||
<div className="Table"> | ||
<div className="Header"> | ||
<div className="Heading">New Cases</div> | ||
<div className="Heading">Date</div> | ||
<div className="Heading">Country</div> | ||
</div> | ||
|
||
{rows.map((row, index) => ( | ||
<div className="Row" key={index}> | ||
<div className="Column">{row[0]}</div> | ||
<div className="Column">{row[1]}</div> | ||
<div className="Column">{row[2]}</div> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; |
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
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
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
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
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