fix: Use the correct currency for edit promotions form (#11307)

FIXES #11297
This commit is contained in:
Stevche Radevski
2025-02-04 18:15:15 +01:00
committed by GitHub
parent 604f46f8bc
commit 87db3f0c45

View File

@@ -233,6 +233,9 @@ export const EditPromotionDetailsForm = ({
control={form.control}
name="value"
render={({ field: { onChange, ...field } }) => {
const currencyCode =
promotion.application_method?.currency_code ?? "USD"
return (
<Form.Item>
<Form.Label>
@@ -247,8 +250,8 @@ export const EditPromotionDetailsForm = ({
onValueChange={(val) =>
onChange(val ? parseInt(val) : null)
}
code={"USD"}
symbol={getCurrencySymbol("USD")}
code={currencyCode}
symbol={getCurrencySymbol(currencyCode)}
{...field}
value={field.value}
/>