From 21cce2532232f11548595474b414fb4ba7deaf1f Mon Sep 17 00:00:00 2001 From: Galen Guyer Date: Wed, 1 Sep 2021 13:01:21 -0400 Subject: update for new semester, oops forgot to commit --- src/MainPage.js | 55 ++++++++++++++++++++++++++----------------------------- 1 file changed, 26 insertions(+), 29 deletions(-) (limited to 'src/MainPage.js') diff --git a/src/MainPage.js b/src/MainPage.js index d841a88..a4bb593 100644 --- a/src/MainPage.js +++ b/src/MainPage.js @@ -6,47 +6,44 @@ const MainPage = (props) => { const data = props.data; const latest = data[data.length - 1]; const prior = data[data.length - (1 + props.timeDifference)]; - const priorPrior = data[Math.max(0, data.length - (1 + props.timeDifference * 2))]; + // const priorPrior = data[Math.max(0, data.length - (1 + props.timeDifference * 2))]; - const positiveTestRate = Math.max( - 0, - Math.min( - 100, - ((latest.total_students - prior.total_students) * 100) / - (latest.tests_administered - prior.tests_administered) - ) - ).toFixed(1); - const priorPositiveTestRate = Math.max( - 0, - Math.min( - 100, - ((prior.total_students - priorPrior.total_students) * 100) / - (prior.tests_administered - priorPrior.tests_administered) - ) - ).toFixed(1); + // const positiveTestRate = Math.max( + // 0, + // Math.min( + // 100, + // ((latest.total_students - prior.total_students) * 100) / + // (latest.tests_administered - prior.tests_administered) + // ) + // ).toFixed(1); + // const priorPositiveTestRate = Math.max( + // 0, + // Math.min( + // 100, + // ((prior.total_students - priorPrior.total_students) * 100) / + // (prior.tests_administered - priorPrior.tests_administered) + // ) + // ).toFixed(1); return ( <> -

+ {/*

Alert Level: {latest.alert_level.charAt(0).toUpperCase() + latest.alert_level.slice(1)}

(Prior Alert Level: {prior.alert_level.charAt(0).toUpperCase() + prior.alert_level.slice(1)})
-
+
*/}

- This dashboard will not be updating for the summer. RIT is only providing the New Cases statistic on the - official dashboard. The API will continue to ingest data and be available, but modifying this page to - accomodate the new dashboard is not currently worth the effort. All historical data will remain - available on this page, but for any new information, please use{" "} - - the official dashboard. - + This dashboard has been refreshed for the new school year. For historical data, please contact + me at gkg1648 [AT] rit [DOT] edu. More cards and features will be re-added if they are added to + the official dashboard.


- Total Positive Cases Since {props.showAllTime ? "August 19 (First Day of Classes)" : "January 1"} + {/* Total Positive Cases Since {props.showAllTime ? "August 19 (First Day of Classes)" : "January 1"} */} + Total Positive Cases Since August 16 (First Day of Move-In)

{ />
-
+ {/*

Number of Students in Quarantine

@@ -160,7 +157,7 @@ const MainPage = (props) => { link="/beds" />
- + */} ); -- cgit v1.2.3