fix(dashboard): add error message in toaster on product delete (#13756)

* fix(dashboard): add error message in toaster on product delete

* Create fuzzy-icons-hope.md

* add description instead
This commit is contained in:
William Bouchard authored and GitHub committed 2025-10-15 14:13:28 -04:00
1 parent 8bb036457c
commit 8642d41aac
2 files changed
+11 -1

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/dashboard": patch
---
fix(dashboard): add error message in toaster on product delete
@@ -1,6 +1,6 @@
import { PencilSquare, Trash } from "@medusajs/icons" import { PencilSquare, Trash } from "@medusajs/icons"
import { HttpTypes } from "@medusajs/types" import { HttpTypes } from "@medusajs/types"
import { Container, Heading, StatusBadge, usePrompt } from "@medusajs/ui" import { Container, Heading, StatusBadge, toast, usePrompt } from "@medusajs/ui"
import { useTranslation } from "react-i18next" import { useTranslation } from "react-i18next"
import { useNavigate } from "react-router-dom" import { useNavigate } from "react-router-dom"
@@ -58,6 +58,11 @@ export const ProductGeneralSection = ({
onSuccess: () => { onSuccess: () => {
navigate("..") navigate("..")
}, },
onError: (e) => {
toast.error(t("products.toasts.delete.error.header"), {
description: e.message,
})
},
}) })
} }