feat(MED-101): add audit log to cart item delete
This commit is contained in:
@@ -5,8 +5,8 @@ import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { toast } from 'sonner';
|
||||
|
||||
import { deleteLineItem } from "@lib/data/cart";
|
||||
import { Spinner } from "@medusajs/icons";
|
||||
import { handleDeleteCartItem } from "~/lib/services/medusaCart.service";
|
||||
|
||||
const CartItemDelete = ({
|
||||
id,
|
||||
@@ -22,7 +22,7 @@ const CartItemDelete = ({
|
||||
setIsDeleting(true);
|
||||
|
||||
const promise = async () => {
|
||||
await deleteLineItem(id);
|
||||
await handleDeleteCartItem({ lineId: id });
|
||||
};
|
||||
|
||||
toast.promise(promise, {
|
||||
|
||||
Reference in New Issue
Block a user