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 63e6cb7..966a39a 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,4 @@ -export type ProductItemProps = { +export type Product = { id: string; name: string; price: number; @@ -12,7 +12,7 @@ export type ProductItemProps = { * send a request to the server to get the products * @returns Array of products */ -export function getProducts(): Promise { +export function getProducts(): Promise { //TODO: Implement the API call using fetch or axios return Promise.resolve([ { 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 cfbe0df..982bc1d 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,14 +8,14 @@ import Typography from '@mui/material/Typography'; import { fCurrency } from 'src/utils/format-number'; -import { ProductItemProps } from 'src/api/product-service'; +import { Product } from 'src/api/product-service'; import { Label } from 'src/components/label'; import { ColorPreview } from 'src/components/color-utils'; // ---------------------------------------------------------------------- -export function ProductItem({ product }: { product: ProductItemProps }) { +export function ProductItem({ product }: { product: Product }) { const renderStatus = (