Skip to content

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

Redirect to product list after deleting a product

dominik-zeglen9de32935a9fb
diff --git a/saleor/static/dashboard-next/products/views/ProductUpdate.tsx b/saleor/static/dashboard-next/products/views/ProductUpdate.tsx
index e768b2fc2b..3210ae03fe 100644
--- a/saleor/static/dashboard-next/products/views/ProductUpdate.tsx
+++ b/saleor/static/dashboard-next/products/views/ProductUpdate.tsx
@@ -3,7 +3,6 @@ import { arrayMove } from "react-sortable-hoc";
import * as placeholderImg from "../../../images/placeholder255x255.png";
import { attributesListUrl } from "../../attributes";
-import { categoryShowUrl } from "../../categories";
import ErrorMessageCard from "../../components/ErrorMessageCard";
import Messages from "../../components/messages";
import Navigator from "../../components/Navigator";
@@ -44,7 +43,7 @@ export const ProductUpdate: React.StatelessComponent<ProductUpdateProps> = ({
const handleDelete = () => {
pushMessage({ text: i18n.t("Product removed") });
- navigate(categoryShowUrl(data.product.category.id));
+ navigate(productListUrl);
};
const handleUpdate = () =>
pushMessage({ text: i18n.t("Saved changes") });