From d161fe64033bacb8d3dc335d84f71675b628ac97 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Fri, 11 Nov 2022 22:44:27 +0000 Subject: [PATCH] fix: don't show vf target if it isn't your score --- .../src/components/tables/cells/VF6Cell.tsx | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/client/src/components/tables/cells/VF6Cell.tsx b/client/src/components/tables/cells/VF6Cell.tsx index 86c5b3c4f..4a3bd4ac9 100644 --- a/client/src/components/tables/cells/VF6Cell.tsx +++ b/client/src/components/tables/cells/VF6Cell.tsx @@ -53,31 +53,34 @@ export default function VF6Cell({ return ( {score.calculatedData.VF6} -
- {vf6Target !== 0 && vf6Target && ( -
- {score.calculatedData.VF6! >= vf6Target ? ( - {vf6Target}VF Target Achieved! - ) : vf6Target > maxVF ? ( - - {vf6Target}VF Not Possible (Max {maxVF}) - - ) : ( - Object.entries(targets).map(([k, v], i) => ( - - -
-
- )) - )} -
+ {vf6Target !== 0 && vf6Target && user?.id === score.userID && ( + <> +
+ +
+ {score.calculatedData.VF6! >= vf6Target ? ( + {vf6Target}VF Target Achieved! + ) : vf6Target > maxVF ? ( + + {vf6Target}VF Not Possible (Max {maxVF}) + + ) : ( + Object.entries(targets).map(([k, v], i) => ( + + +
+
+ )) + )} +
+ )} );