From 0216f8879440ce73d90a9e58cc5eac68240e9fdd Mon Sep 17 00:00:00 2001 From: Galen Guyer Date: Fri, 29 Oct 2021 12:19:15 -0400 Subject: add static data for 2020-2021 school year --- 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