Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Change Money to Percent component
dominik-zeglen47f84206f77f
diff --git a/saleor/static/dashboard-next/vouchers/components/VoucherList/VoucherList.tsx b/saleor/static/dashboard-next/vouchers/components/VoucherList/VoucherList.tsxindex 6a5a9a147d..00945041af 100644--- a/saleor/static/dashboard-next/vouchers/components/VoucherList/VoucherList.tsx+++ b/saleor/static/dashboard-next/vouchers/components/VoucherList/VoucherList.tsx@@ -12,6 +12,7 @@ import { createVoucherName, VoucherType } from "../..";import { ListProps } from "../../..";import DateFormatter from "../../../components/DateFormatter";import Money from "../../../components/Money";+import Percent from "../../../components/Percent";import Skeleton from "../../../components/Skeleton";import TablePagination from "../../../components/TablePagination";import i18n from "../../../i18n";@@ -154,15 +155,18 @@ const VoucherList = decorate<VoucherListProps>({voucher &&voucher.discountValueType &&voucher.discountValue ? (- <Money- amount={voucher.discountValue}- currency={- voucher.discountValueType === "PERCENTAGE"- ? "%"- : currency- }- typographyProps={{ className: classes.tableCellFont }}- />+ voucher.discountValueType === "PERCENTAGE" ? (+ <Percent+ amount={voucher.discountValue}+ typographyProps={{ className: classes.tableCellFont }}+ />+ ) : (+ <Money+ amount={voucher.discountValue}+ currency={currency}+ typographyProps={{ className: classes.tableCellFont }}+ />+ )) : (<Skeleton />)}