mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-06 13:58:05 +03:00
fix: don't show vf target if it isn't your score
This commit is contained in:
@@ -53,31 +53,34 @@ export default function VF6Cell({
|
||||
return (
|
||||
<td>
|
||||
<strong className="underline-on-hover">{score.calculatedData.VF6}</strong>
|
||||
<br />
|
||||
|
||||
{vf6Target !== 0 && vf6Target && (
|
||||
<div>
|
||||
{score.calculatedData.VF6! >= vf6Target ? (
|
||||
<small className="text-success">{vf6Target}VF Target Achieved!</small>
|
||||
) : vf6Target > maxVF ? (
|
||||
<small className="text-muted">
|
||||
{vf6Target}VF Not Possible (Max {maxVF})
|
||||
</small>
|
||||
) : (
|
||||
Object.entries(targets).map(([k, v], i) => (
|
||||
<React.Fragment key={k}>
|
||||
<VF6TargetCell
|
||||
vf6Target={vf6Target!}
|
||||
targetScore={v}
|
||||
targetDelta={v === null ? null : v - score.scoreData.score}
|
||||
clearType={k}
|
||||
showClearType={i !== 0 || score.scoreData.lamp === "FAILED"}
|
||||
/>
|
||||
<br />
|
||||
</React.Fragment>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
{vf6Target !== 0 && vf6Target && user?.id === score.userID && (
|
||||
<>
|
||||
<br />
|
||||
|
||||
<div>
|
||||
{score.calculatedData.VF6! >= vf6Target ? (
|
||||
<small className="text-success">{vf6Target}VF Target Achieved!</small>
|
||||
) : vf6Target > maxVF ? (
|
||||
<small className="text-muted">
|
||||
{vf6Target}VF Not Possible (Max {maxVF})
|
||||
</small>
|
||||
) : (
|
||||
Object.entries(targets).map(([k, v], i) => (
|
||||
<React.Fragment key={k}>
|
||||
<VF6TargetCell
|
||||
vf6Target={vf6Target!}
|
||||
targetScore={v}
|
||||
targetDelta={v === null ? null : v - score.scoreData.score}
|
||||
clearType={k}
|
||||
showClearType={i !== 0 || score.scoreData.lamp === "FAILED"}
|
||||
/>
|
||||
<br />
|
||||
</React.Fragment>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</td>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user