feat(MED-100): show toast on delete

This commit is contained in:
2025-07-17 10:44:05 +03:00
parent 25b4e06b89
commit 7ccc45ce77
7 changed files with 78 additions and 10 deletions

View File

@@ -1,14 +1,13 @@
"use client"
import { HttpTypes } from "@medusajs/types"
import DeleteButton from "@modules/common/components/delete-button"
import { useTranslation } from "react-i18next"
import {
TableCell,
TableRow,
} from '@kit/ui/table';
import { formatCurrency } from "@/packages/shared/src/utils"
import { Trash } from "lucide-react"
import CartItemDelete from "./cart-item-delete";
export default function CartItem({ item, currencyCode }: {
item: HttpTypes.StoreCartLineItem
@@ -49,7 +48,7 @@ export default function CartItem({ item, currencyCode }: {
<TableCell className="text-right px-6">
<span className="flex gap-x-1 justify-end w-[60px]">
<DeleteButton id={item.id} data-testid="product-delete-button" Icon={<Trash />} />
<CartItemDelete id={item.id} />
</span>
</TableCell>
</TableRow>