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
2025-10-15 14:13:28 -04:00
committed by GitHub
parent 8bb036457c
commit 8642d41aac
2 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/dashboard": patch
---
fix(dashboard): add error message in toaster on product delete

View File

@@ -1,6 +1,6 @@
import { PencilSquare, Trash } from "@medusajs/icons"
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 { useNavigate } from "react-router-dom"
@@ -58,6 +58,11 @@ export const ProductGeneralSection = ({
onSuccess: () => {
navigate("..")
},
onError: (e) => {
toast.error(t("products.toasts.delete.error.header"), {
description: e.message,
})
},
})
}