Fix discounts

This commit is contained in:
tobspr 2022-05-20 17:39:47 +02:00
parent c2c3bd67f4
commit 75d3a13688
2 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ export class HUDStandaloneAdvantages extends BaseHUDPart {
<div class="lowerBar">
<button class="steamLinkButton ${A_B_TESTING_LINK_TYPE}">
${
globalConfig.currentDiscount && globalConfig.currentDiscount.until > new Date().getTime()
globalConfig.currentDiscount.active
? `<span class='discount'>${globalConfig.currentDiscount.amount}% off!</span>`
: ""
}

View File

@ -25,9 +25,9 @@ export class HUDWatermark extends BaseHUDPart {
this.linkElement = makeDiv(
parent,
"ingame_HUD_WatermarkClicker",
globalConfig.currentDiscount ? ["withDiscount"] : [""],
globalConfig.currentDiscount.active ? ["withDiscount"] : [""],
T.ingame.watermark.get_on_steam +
(globalConfig.currentDiscount && globalConfig.currentDiscount.until > new Date().getTime()
(globalConfig.currentDiscount.active
? `<span class='discount'>${globalConfig.currentDiscount.amount}% off!</span>`
: "")
);