diff options
author | Galen Guyer <galen@galenguyer.com> | 2020-11-13 21:09:41 -0500 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2020-11-13 21:09:41 -0500 |
commit | 7c69c7207d9754130a84619d910feaf66754dd04 (patch) | |
tree | 717c15222bfe390f437a5a4b7a65ef1e3e0e3773 /src/App.js | |
parent | 26f0066f9b2daa904d4fe4cac80841cbe40360ca (diff) |
Add cards for total cases
Diffstat (limited to 'src/App.js')
-rw-r--r-- | src/App.js | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,5 +1,5 @@ import useSWR from "swr"; -import logo from "./logo.svg"; +import Card from "./Card"; import "./App.css"; const url = "https://rcpoller.galenguyer.com/api/v0/history"; @@ -22,10 +22,16 @@ function App() { </div> ); + const latest = data[data.length - 1]; + const prior = data[data.length - 2]; + return ( <div className="App"> <h1>RIT Covid Dashboard</h1> - <h2>Data Loaded</h2> + <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} /> + </div> </div> ); } |