chore: fix

This commit is contained in:
2026-05-03 19:38:29 +02:00
parent 4075ae2568
commit f8473b9a54
27 changed files with 608 additions and 115 deletions
+3 -3
View File
@@ -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; }