From 0f124e66f23d8925af91d574740f8513dd343dd6 Mon Sep 17 00:00:00 2001 From: Galen Guyer Date: Mon, 16 Nov 2020 19:03:26 -0500 Subject: Move data into MainPage --- src/App.js | 2 +- src/MainPage.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/App.js b/src/App.js index d8653a5..fbee2c1 100644 --- a/src/App.js +++ b/src/App.js @@ -70,7 +70,7 @@ function App() {
- {" "} + { - const latest = props.latest; - const prior = props.prior; + const data = props.data; + const latest = data[data.length - 1]; + const prior = data[data.length - (1 + props.timeDifference)]; return ( <> -- cgit v1.2.3