Created
November 9, 2024 01:50
-
-
Save broguinn/95b3cd94142c8f042e58924c86c089f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cloud/web/src/components/price-panel/PricePanel.tsx b/cloud/web/src/components/price-panel/PricePanel.tsx | |
index c94334345..0bedfab0b 100644 | |
--- a/cloud/web/src/components/price-panel/PricePanel.tsx | |
+++ b/cloud/web/src/components/price-panel/PricePanel.tsx | |
@@ -23,6 +23,7 @@ export default function PricePanel({ | |
const promoCodeResponse = useQuery({ | |
queryKey: ["getPromoCode", promoCode], | |
queryFn: () => getPromoCodeData(promoCode), | |
+ enabled: !!promoCode, | |
}); | |
const promoCodeApplied = | |
@@ -228,7 +229,7 @@ const Price = ({ | |
cost: number | undefined; | |
discount: string | undefined; | |
}) => { | |
- const discounted = Number(cost) !== Number(discount); | |
+ const discounted = discount && Number(cost) !== Number(discount); | |
const discountString = Math.round(Number(discount)).toLocaleString(); | |
console.log(cost); | |
console.log(discount); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment