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

FIXES #11297
This commit is contained in:
Stevche Radevski authored and GitHub committed 2025-02-04 17:15:15 +00:00
1 parent 604f46f8bc
commit 87db3f0c45
1 file changed
+5 -2
@@ -233,6 +233,9 @@ export const EditPromotionDetailsForm = ({
control={form.control} control={form.control}
name="value" name="value"
render={({ field: { onChange, ...field } }) => { render={({ field: { onChange, ...field } }) => {
const currencyCode =
promotion.application_method?.currency_code ?? "USD"
return ( return (
<Form.Item> <Form.Item>
<Form.Label> <Form.Label>
@@ -247,8 +250,8 @@ export const EditPromotionDetailsForm = ({
onValueChange={(val) => onValueChange={(val) =>
onChange(val ? parseInt(val) : null) onChange(val ? parseInt(val) : null)
} }
code={"USD"} code={currencyCode}
symbol={getCurrencySymbol("USD")} symbol={getCurrencySymbol(currencyCode)}
{...field} {...field}
value={field.value} value={field.value}
/> />