diff --git a/src/client/dd-hub-react/src/api/product-service.ts b/src/client/dd-hub-react/src/api/product-service.ts index 0f68455..63e6cb7 100644 --- a/src/client/dd-hub-react/src/api/product-service.ts +++ b/src/client/dd-hub-react/src/api/product-service.ts @@ -1,4 +1,12 @@ -import { ProductItemProps } from "src/sections/product/product-item"; +export type ProductItemProps = { + id: string; + name: string; + price: number; + status: string; + coverUrl: string; + colors: string[]; + priceSale: number | null; +}; /** * send a request to the server to get the products diff --git a/src/client/dd-hub-react/src/sections/product/product-item.tsx b/src/client/dd-hub-react/src/sections/product/product-item.tsx index bb4c4db..cfbe0df 100644 --- a/src/client/dd-hub-react/src/sections/product/product-item.tsx +++ b/src/client/dd-hub-react/src/sections/product/product-item.tsx @@ -8,21 +8,13 @@ import Typography from '@mui/material/Typography'; import { fCurrency } from 'src/utils/format-number'; +import { ProductItemProps } from 'src/api/product-service'; + import { Label } from 'src/components/label'; import { ColorPreview } from 'src/components/color-utils'; // ---------------------------------------------------------------------- -export type ProductItemProps = { - id: string; - name: string; - price: number; - status: string; - coverUrl: string; - colors: string[]; - priceSale: number | null; -}; - export function ProductItem({ product }: { product: ProductItemProps }) { const renderStatus = (