From 7f32207224013de5afdd49f8a96a05af3aee81fb Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 14 Jan 2023 14:27:20 +0000 Subject: [PATCH] add show pp ui functionality --- src/components/ScoreStats.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/ScoreStats.js b/src/components/ScoreStats.js index 2cafdbe..dadc053 100644 --- a/src/components/ScoreStats.js +++ b/src/components/ScoreStats.js @@ -4,7 +4,10 @@ import { useSongDataStore } from "../store/songDataStore"; import styles from "../styles/scoreStats.module.css"; export default function ScoreStats() { - const [showScoreInfo] = useSettingsStore((store) => [store.showScoreInfo]); + const [showScoreInfo, showPp] = useSettingsStore((store) => [ + store.showScoreInfo, + store.showPp, + ]); const [percentage, currentScore, currentPP, combo, isLoading] = useSongDataStore((store) => [ store.percentage, @@ -40,7 +43,9 @@ export default function ScoreStats() {

{getFormattedScorePercent(percentage)} {percentage.toFixed(2)}%

- {currentPP !== undefined ?

{currentPP.toFixed(0)}pp

: null} + {currentPP !== undefined && showPp ? ( +

{currentPP.toFixed(0)}pp

+ ) : null}