fix hand acc
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m23s
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m23s
This commit is contained in:
parent
ff9ff5b96b
commit
299cf20cb9
@ -22,8 +22,8 @@ export function HandAccuracy({ score, hand }: HandAccuracyProps) {
|
|||||||
const { handAccuracy } = score.additionalData;
|
const { handAccuracy } = score.additionalData;
|
||||||
const scoreImprovement = score.additionalData.scoreImprovement;
|
const scoreImprovement = score.additionalData.scoreImprovement;
|
||||||
const previousHandAccuracy = scoreImprovement ? handAccuracy[hand] - scoreImprovement.handAccuracy[hand] : undefined;
|
const previousHandAccuracy = scoreImprovement ? handAccuracy[hand] - scoreImprovement.handAccuracy[hand] : undefined;
|
||||||
|
|
||||||
const formattedHand = capitalizeFirstLetter(hand);
|
const formattedHand = capitalizeFirstLetter(hand);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col items-center justify-center">
|
<div className="flex flex-col items-center justify-center">
|
||||||
<Tooltip display={`${formattedHand} Hand Accuracy`}>
|
<Tooltip display={`${formattedHand} Hand Accuracy`}>
|
||||||
|
@ -125,6 +125,9 @@ const badges: ScoreBadge[] = [
|
|||||||
name: "Left Hand Accuracy",
|
name: "Left Hand Accuracy",
|
||||||
color: () => "bg-hands-left",
|
color: () => "bg-hands-left",
|
||||||
create: (score: ScoreSaberScore) => {
|
create: (score: ScoreSaberScore) => {
|
||||||
|
if (!score.additionalData) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
return <HandAccuracy score={score} hand="left" />;
|
return <HandAccuracy score={score} hand="left" />;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -132,6 +135,9 @@ const badges: ScoreBadge[] = [
|
|||||||
name: "Right Hand Accuracy",
|
name: "Right Hand Accuracy",
|
||||||
color: () => "bg-hands-right",
|
color: () => "bg-hands-right",
|
||||||
create: (score: ScoreSaberScore) => {
|
create: (score: ScoreSaberScore) => {
|
||||||
|
if (!score.additionalData) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
return <HandAccuracy score={score} hand="right" />;
|
return <HandAccuracy score={score} hand="right" />;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user