From 299cf20cb94566e6c940d6fbddcf639f34ceb5db Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 23 Oct 2024 07:40:11 +0100 Subject: [PATCH] fix hand acc --- projects/website/src/components/score/hand-accuracy.tsx | 2 +- projects/website/src/components/score/score-stats.tsx | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/website/src/components/score/hand-accuracy.tsx b/projects/website/src/components/score/hand-accuracy.tsx index 864c56b..ace23cf 100644 --- a/projects/website/src/components/score/hand-accuracy.tsx +++ b/projects/website/src/components/score/hand-accuracy.tsx @@ -22,8 +22,8 @@ export function HandAccuracy({ score, hand }: HandAccuracyProps) { const { handAccuracy } = score.additionalData; const scoreImprovement = score.additionalData.scoreImprovement; const previousHandAccuracy = scoreImprovement ? handAccuracy[hand] - scoreImprovement.handAccuracy[hand] : undefined; - const formattedHand = capitalizeFirstLetter(hand); + return (
diff --git a/projects/website/src/components/score/score-stats.tsx b/projects/website/src/components/score/score-stats.tsx index dc7e6fc..cf03867 100644 --- a/projects/website/src/components/score/score-stats.tsx +++ b/projects/website/src/components/score/score-stats.tsx @@ -125,6 +125,9 @@ const badges: ScoreBadge[] = [ name: "Left Hand Accuracy", color: () => "bg-hands-left", create: (score: ScoreSaberScore) => { + if (!score.additionalData) { + return undefined; + } return ; }, }, @@ -132,6 +135,9 @@ const badges: ScoreBadge[] = [ name: "Right Hand Accuracy", color: () => "bg-hands-right", create: (score: ScoreSaberScore) => { + if (!score.additionalData) { + return undefined; + } return ; }, },