From e71cc10f9121c7e8422593a3b2e6f2312c0a82f1 Mon Sep 17 00:00:00 2001 From: Mateusz Pstrucha Date: Tue, 9 Nov 2021 07:41:30 +0100 Subject: [PATCH 1/6] fix: wrong total --- src/components/Info/Info.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Info/Info.js b/src/components/Info/Info.js index 21f07f8..c3d9639 100644 --- a/src/components/Info/Info.js +++ b/src/components/Info/Info.js @@ -87,8 +87,8 @@ function Info({ top }) { setModalReport(false) } - const total = track.stats.total, - percent = total > 0 ? (track.stats.up / total) * 100 : 50 + const total = track.stats?.up + track.stats?.down, + percent = total > 0 ? (track.stats?.up / total) * 100 : 50 document.setTitle(track.title) @@ -210,8 +210,8 @@ function Info({ top }) { {id} {modalReport && ( - -