From 071632e2bee59d64b4d196ed3512af7f24c6b994 Mon Sep 17 00:00:00 2001 From: Galen Guyer Date: Mon, 16 Nov 2020 20:17:14 -0500 Subject: add positiveTests table --- src/HistoryTable.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/HistoryTable.js (limited to 'src/HistoryTable.js') diff --git a/src/HistoryTable.js b/src/HistoryTable.js new file mode 100644 index 0000000..fb27f0e --- /dev/null +++ b/src/HistoryTable.js @@ -0,0 +1,40 @@ +import { React } from "react"; +import { DateTime } from "luxon"; +import GoatCounter from "./GoatCounter"; + +const HistoryTable = (props) => { + const data = props.data; + console.log(data); + let table = ( + + + + + + + {data.map((element) => { + return ( + + + + + ); + })} + +
DatePositive Case Rate
+ {DateTime.fromSQL(element.date, { zone: "UTC" }) + .setZone(DateTime.local().zoneName) + .toLocaleString({ weekday: "long", month: "long", day: "2-digit" })} + {element.value}%
+ ); + + return ( + <> +

{props.name}

+ {table} + + + ); +}; + +export default HistoryTable; -- cgit v1.2.3