chore: fix
This commit is contained in:
@@ -42,7 +42,7 @@ function Cart() {
|
||||
useEffect(() => {
|
||||
if (!isUserAuthenticated()) { navigate("/login/client", { replace: true }); return; }
|
||||
refreshCart();
|
||||
}, []);
|
||||
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
const total = cartItems.reduce((sum, item) => sum + item.price, 0);
|
||||
|
||||
@@ -71,7 +71,7 @@ function Cart() {
|
||||
const res = await getProductById(item.product_id);
|
||||
if (res.success && res.data) {
|
||||
const p = res.data;
|
||||
const videoMedia = p.media?.find((m: any) => m && m.type === "video");
|
||||
const videoMedia = p.media?.find((m) => m && m.type === "video");
|
||||
return {
|
||||
...item,
|
||||
image: getProductImage(p),
|
||||
@@ -89,7 +89,7 @@ function Cart() {
|
||||
}
|
||||
};
|
||||
enrich();
|
||||
}, [cartItems]);
|
||||
}, [cartItems]); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
const handleClearCart = async () => {
|
||||
if (!isUserAuthenticated()) { navigate("/login/client", { replace: true }); return; }
|
||||
|
||||
Reference in New Issue
Block a user