generated from nhcarrigan/template
feat: respect integer format pref
This commit is contained in:
@@ -15,7 +15,7 @@ import { computePartyCombatPower } from "../../engine/tick.js";
|
||||
import { cdnImage } from "../../utils/cdn.js";
|
||||
import { LockToggle } from "../ui/lockToggle.js";
|
||||
import { ZoneSelector } from "./zoneSelector.js";
|
||||
import type { Boss } from "@elysium/types";
|
||||
import type { Boss, NumberFormat } from "@elysium/types";
|
||||
|
||||
interface BossCardProperties {
|
||||
readonly boss: Boss;
|
||||
@@ -23,7 +23,7 @@ interface BossCardProperties {
|
||||
readonly onChallenge: (bossId: string)=> void;
|
||||
readonly isChallenging: boolean;
|
||||
readonly unlockHint: string | undefined;
|
||||
readonly formatInteger: (n: number)=> string;
|
||||
readonly formatInteger: (n: number, format: NumberFormat)=> string;
|
||||
readonly formatNumber: (n: number)=> string;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ const BossCard = ({
|
||||
{boss.crystalReward > 0
|
||||
&& <span>
|
||||
{"💎 "}
|
||||
{formatInteger(boss.crystalReward)}
|
||||
{formatInteger(boss.crystalReward, numberFormat)}
|
||||
</span>
|
||||
}
|
||||
{boss.equipmentRewards.length > 0
|
||||
@@ -175,6 +175,7 @@ const BossPanel = (): JSX.Element => {
|
||||
autoBossLastResult,
|
||||
autoBossError,
|
||||
bossError,
|
||||
numberFormat,
|
||||
} = useGame();
|
||||
const [ challengingBossId, setChallengingBossId ] = useState<string | null>(
|
||||
null,
|
||||
@@ -403,6 +404,7 @@ const BossPanel = (): JSX.Element => {
|
||||
formatNumber={formatNumber}
|
||||
isChallenging={challengingBossId === bossId}
|
||||
key={bossId}
|
||||
numberFormat={numberFormat}
|
||||
onChallenge={handleChallengeClick}
|
||||
prestigeCount={prestigeCount}
|
||||
unlockHint={bossUnlockHints.get(bossId)}
|
||||
|
||||
Reference in New Issue
Block a user