diff --git a/apps/cms/src/@types/IProduct.ts b/apps/cms/src/@types/IProduct.ts deleted file mode 100644 index 2c1f7f54..00000000 --- a/apps/cms/src/@types/IProduct.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Product } from "./Product"; - -export interface IProduct extends Product {} diff --git a/apps/cms/src/admin/utils/RenderCellFactory.tsx b/apps/cms/src/admin/utils/RenderCellFactory.tsx index ac8612a4..1a269154 100644 --- a/apps/cms/src/admin/utils/RenderCellFactory.tsx +++ b/apps/cms/src/admin/utils/RenderCellFactory.tsx @@ -73,7 +73,7 @@ export class RenderCellFactory { return ImageComponentCell; } if (key === "stock") { - const ObjectComponent: React.FC<{ data: any }> = ({ data }) => ( + const ObjectComponent: React.FC<{ data: string }> = ({ data }) => (
{Object.entries(data).map(([subKey, value], index) => (
diff --git a/apps/cms/src/admin/views/MerchProducts.tsx b/apps/cms/src/admin/views/MerchProducts.tsx index 1bb59f7e..684de204 100644 --- a/apps/cms/src/admin/views/MerchProducts.tsx +++ b/apps/cms/src/admin/views/MerchProducts.tsx @@ -7,7 +7,6 @@ import { RenderCellFactory } from "../utils/RenderCellFactory"; import SortedColumn from "../utils/SortedColumn"; import { Table } from "payload/dist/admin/components/elements/Table"; import { Product } from "../../@types/Product"; -import { IProduct } from "../../@types/IProduct"; import ProductsApi from "../../apis/products.api"; const MerchProducts: AdminView = ({ user, canAccessAdmin }) => { diff --git a/apps/cms/src/apis/products.api.ts b/apps/cms/src/apis/products.api.ts index 8b4c7dda..c54ea5d3 100644 --- a/apps/cms/src/apis/products.api.ts +++ b/apps/cms/src/apis/products.api.ts @@ -1,4 +1,3 @@ -import { IProduct } from "../@types/IProduct"; import { Product } from "../@types/Product"; // todo turn into real api class ProductsApi {