diff options
author | Galen Guyer <galen@galenguyer.com> | 2022-04-13 19:10:44 -0400 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2022-04-13 19:44:24 -0400 |
commit | 264e571b0ca34d24f4997c5864a43d4f475e14dc (patch) | |
tree | 3ddfb30dbd97dc5c5c3da91a8e1cba4916348190 /src/HistoryTable.js | |
parent | 290e1694efacc8bfea62b78538cb9d40003f62f6 (diff) |
full version 2 re-write
Diffstat (limited to 'src/HistoryTable.js')
-rw-r--r-- | src/HistoryTable.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/HistoryTable.js b/src/HistoryTable.js deleted file mode 100644 index fb27f0e..0000000 --- a/src/HistoryTable.js +++ /dev/null @@ -1,40 +0,0 @@ -import { React } from "react"; -import { DateTime } from "luxon"; -import GoatCounter from "./GoatCounter"; - -const HistoryTable = (props) => { - const data = props.data; - console.log(data); - let table = ( - <table className="table-auto" style={{ marginLeft: "auto", marginRight: "auto" }}> - <tbody> - <tr> - <td className="border py-2 px-4">Date</td> - <td className="border py-2 px-4">Positive Case Rate</td> - </tr> - {data.map((element) => { - return ( - <tr> - <td className="border px-4" py-2> - {DateTime.fromSQL(element.date, { zone: "UTC" }) - .setZone(DateTime.local().zoneName) - .toLocaleString({ weekday: "long", month: "long", day: "2-digit" })} - </td> - <td className="border px-4 py-2">{element.value}%</td> - </tr> - ); - })} - </tbody> - </table> - ); - - return ( - <> - <h3 className="text-3xl">{props.name}</h3> - {table} - <GoatCounter /> - </> - ); -}; - -export default HistoryTable; |