mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 21:32:05 +00:00
* Add bun-types to packages * Improve typing * Fix types in tests * Fix dts tests * Run formatter * Fix all type errors * Add strict mode, fix type errors * Add ffi changes * Move workflows to root * Add workflows * Remove labeler * Add child_process types * Fix synthetic defaults issue * Remove docs * Move scripts * Run prettier * Include examples in typechecking * captureStackTrace types * moved captureStackTrace types to globals * Address reviews Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
34 lines
873 B
TypeScript
34 lines
873 B
TypeScript
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>
|
|
);
|
|
};
|