diff options
author | Galen Guyer <galen@galenguyer.com> | 2020-11-14 20:05:28 -0500 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2020-11-14 20:05:28 -0500 |
commit | ed3c6044670f1a4f83a1174afd23c4171a3449c5 (patch) | |
tree | 0216a87b81ddae43369772c6652dc37a63b3e3cc | |
parent | 89a4e929a9b97867f9ed8f57b41a0a661ad34d0b (diff) |
add prior update time
-rw-r--r-- | src/App.js | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -29,11 +29,14 @@ function App() { const prior = data[data.length - 2]; const local = DateTime.local().zoneName; const lastUpdate = DateTime.fromSQL(latest.last_updated, { zone: "UTC" }).setZone(local); + const priorUpdate = DateTime.fromSQL(prior.last_updated, { zone: "UTC" }).setZone(local); return ( <BrowserRouter> <div className="App"> - <h1 className="text-4xl"><Link to="/">RIT Covid Dashboard</Link></h1> + <h1 className="text-4xl"> + <Link to="/">RIT Covid Dashboard</Link> + </h1> <h3> Last Updated:{" "} {lastUpdate.toLocaleString({ @@ -44,6 +47,16 @@ function App() { minute: "2-digit", })} </h3> + <h4 className="text-sm text-gray-600"> + Prior Update:{" "} + {priorUpdate.toLocaleString({ + weekday: "long", + month: "long", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + })} + </h4> <br /> <Switch> <Route exact path="/"> |