Skip to content

Commit

Permalink
fix pill cluster to say doubloon instead of doubloons when there is o…
Browse files Browse the repository at this point in the history
…nly one doubloon

Signed-off-by: Karim <[email protected]>
  • Loading branch information
truekas authored Nov 17, 2024
1 parent 8692422 commit 18f4a32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ui/ship-pill-cluster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function ShipPillCluster({
? shipChains.get(ship.wakatimeProjectNames.join(','))
: null
const shipUpdateCount = shipUpdates ? shipUpdates.length - 1 : null

const unit = ship.doubloonPayout == 1 || "1" ? "Doubloon" : "Doubloons";
return (
<>
<Pill msg={`${ship.total_hours?.toFixed(1) ?? 0} hr`} glyph="clock" />
Expand All @@ -24,7 +24,7 @@ export default function ShipPillCluster({
(ship.voteRequirementMet ? (
ship.doubloonPayout != null ? (
<Pill
msg={`${Math.floor(ship.doubloonPayout)} Doubloons`}
msg={`${Math.floor(ship.doubloonPayout)} ${unit}`}
color="green"
glyphImage={
<Image src={DoubloonsImage} alt="doubloons" height={20} />
Expand Down

0 comments on commit 18f4a32

Please sign in to comment.