From 8d42c8d763ff0d86a24b6387bcae302139cd6bdd Mon Sep 17 00:00:00 2001 From: Jacob Louis Hoover Date: Tue, 25 Jan 2022 13:11:04 -0500 Subject: [PATCH] set const maxValue = Math.max(...winDistribution) --- src/components/stats/Histogram.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/stats/Histogram.tsx b/src/components/stats/Histogram.tsx index c1b8883..f496309 100644 --- a/src/components/stats/Histogram.tsx +++ b/src/components/stats/Histogram.tsx @@ -6,7 +6,8 @@ type Props = { } export const Histogram = ({ gameStats }: Props) => { - const { totalGames, winDistribution } = gameStats + const winDistribution = gameStats.winDistribution + const maxValue = Math.max(...winDistribution) return (
@@ -14,7 +15,7 @@ export const Histogram = ({ gameStats }: Props) => { ))}