From d5f6f27b2ccd99bab620b3a09e556eab24b8ea2d Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Mon, 13 Jul 2020 12:17:31 +0200 Subject: [PATCH] Display correct weight unit --- .../ProductTypeCreatePage/ProductTypeCreatePage.tsx | 2 +- .../ProductTypeDetailsPage/ProductTypeDetailsPage.tsx | 2 +- .../components/ProductTypeShipping/ProductTypeShipping.tsx | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx b/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx index 6616baebd..3a11f5705 100644 --- a/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx +++ b/src/productTypes/components/ProductTypeCreatePage/ProductTypeCreatePage.tsx @@ -105,7 +105,7 @@ const ProductTypeCreatePage: React.FC = ({ diff --git a/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx b/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx index d46382479..1737361f9 100644 --- a/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx +++ b/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx @@ -199,7 +199,7 @@ const ProductTypeDetailsPage: React.FC = ({ diff --git a/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx b/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx index afb146aca..cb8ca105f 100644 --- a/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx +++ b/src/productTypes/components/ProductTypeShipping/ProductTypeShipping.tsx @@ -6,21 +6,20 @@ import { useIntl } from "react-intl"; import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; -import { WeightUnitsEnum } from "../../../types/globalTypes"; interface ProductTypeShippingProps { data: { isShippingRequired: boolean; weight: number | null; }; - defaultWeightUnit: WeightUnitsEnum; + weightUnit: string; disabled: boolean; onChange: (event: React.ChangeEvent) => void; } const ProductTypeShipping: React.FC = ({ data, - defaultWeightUnit, + weightUnit, disabled, onChange }) => { @@ -48,7 +47,7 @@ const ProductTypeShipping: React.FC = ({ {data.isShippingRequired && (