aboutsummaryrefslogtreecommitdiff
path: root/src/App.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/App.js')
-rw-r--r--src/App.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/App.js b/src/App.js
index 4abd1e4..74d97be 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,4 +1,5 @@
import useSWR from "swr";
+import { DateTime } from "luxon";
import Card from "./Card";
import "./App.css";
@@ -24,10 +25,13 @@ function App() {
const latest = data[data.length - 1];
const prior = data[data.length - 2];
+ const local = DateTime.local().zoneName;
+ const lastUpdate = DateTime.fromSQL(latest.last_updated, { zone: "UTC" }).setZone(local);
return (
<div className="App">
<h1>RIT Covid Dashboard</h1>
+ <h3>Last Updated: {lastUpdate.toLocaleString(DateTime.DATETIME_FULL)}</h3>
<div className="Section">
<Card name="Total Student Cases" latest={latest.total_students} prior={prior.total_students} />
<Card name="Total Staff Cases" latest={latest.total_staff} prior={prior.total_staff} />