diff options
Diffstat (limited to 'src/MainPage.js')
-rw-r--r-- | src/MainPage.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/MainPage.js b/src/MainPage.js index 7c316c4..7dd0cc9 100644 --- a/src/MainPage.js +++ b/src/MainPage.js @@ -3,8 +3,9 @@ import Card from "./Card"; import GoatCounter from "./GoatCounter"; const MainPage = (props) => { - 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 ( <> |