From bb047b17b05bf304dd21fdcabb75e872a4fcfb00 Mon Sep 17 00:00:00 2001 From: mohammadpy8 Date: Mon, 28 Aug 2023 08:40:24 +0330 Subject: [PATCH] Card --- src/components/cart/Card.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/cart/Card.tsx b/src/components/cart/Card.tsx index 1843bb2..d2af114 100644 --- a/src/components/cart/Card.tsx +++ b/src/components/cart/Card.tsx @@ -6,7 +6,7 @@ import { CartContext } from '../../context/CartContextProvider' import swal from 'sweetalert' import { useNavigate } from 'react-router-dom' -const Card = ({ id, title, image, price, rating: { rate } }: Produts) => { +const Card: React.FC = ({ id, title, image, price, rating: { rate } }) => { const CartContextProduct = useContext(CartContext); @@ -19,15 +19,15 @@ const Card = ({ id, title, image, price, rating: { rate } }: Produts) => { swal({ title: "محصول به سبد خرید اضافه شد.", icon: "success", - buttons: ["اوکی","رفتن به سبد خرید"] + buttons: ["اوکی", "رفتن به سبد خرید"] }) .then(result => { - console.log(result); + console.log(result); if (result) { navigate("/cart"); - } - }) - } + } + }) + }; return (