Skip to content

Commit

Permalink
fix: Use the correct currency for edit promotions form (#11307)
Browse files Browse the repository at this point in the history
FIXES #11297
  • Loading branch information
sradevski authored Feb 4, 2025
1 parent 604f46f commit 87db3f0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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}
/>
Expand Down

0 comments on commit 87db3f0

Please sign in to comment.