Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Remove id from background object, because its unnecessary

Lukasz Szewczyk2c33060d69a5
diff --git a/saleor/static/dashboard-next/categories/components/CategoryBackground/CategoryBackground.tsx b/saleor/static/dashboard-next/categories/components/CategoryBackground/CategoryBackground.tsx
index 13105316be..ef7c0340ce 100644
--- a/saleor/static/dashboard-next/categories/components/CategoryBackground/CategoryBackground.tsx
+++ b/saleor/static/dashboard-next/categories/components/CategoryBackground/CategoryBackground.tsx
@@ -112,7 +112,7 @@ const BackgroundImage = decorate<BackgroundImageProps>(
open={opened}
onClose={toggle}
onConfirm={() => {
- onImageDelete(backgroundImage.id)();
+ onImageDelete(backgroundImage.url)();
toggle();
}}
variant="delete"
diff --git a/saleor/static/dashboard-next/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx b/saleor/static/dashboard-next/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx
index e2f090dfc6..d009726f2d 100644
--- a/saleor/static/dashboard-next/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx
+++ b/saleor/static/dashboard-next/categories/components/CategoryUpdatePage/CategoryUpdatePage.tsx
@@ -30,6 +30,7 @@ interface FormData {
seoTitle: string;
seoDescription: string;
}
+
export interface CategoryUpdatePageProps {
errors: UserError[];
disabled: boolean;
@@ -41,7 +42,6 @@ export interface CategoryUpdatePageProps {
description: string;
};
backgroundImage: {
- id?: string;
url?: string;
};
products: Array<{
diff --git a/saleor/static/dashboard-next/categories/fixtures.ts b/saleor/static/dashboard-next/categories/fixtures.ts
index 099d5a825f..2d714d6489 100644
--- a/saleor/static/dashboard-next/categories/fixtures.ts
+++ b/saleor/static/dashboard-next/categories/fixtures.ts
@@ -73,7 +73,6 @@ export const category = (placeholderImage: string) => ({
id: "c1",
name: "Apparel",
backgroundImage: {
- id: "UPJvZHVjfEs4YWdlOjV",
url: block1
},
products: products(placeholderImage)