"use client";
import React from 'react';
import Image from 'next/image';
import Link from 'next/link';
import { useCartStore } from '@/lib/cart-store';
import { formatCurrency } from '@/lib/utils';
import { Minus, Plus, Trash2 } from 'lucide-react';
export function CartItems() {
const { items, removeItem, updateQuantity } = useCartStore();
if (items.length === 0) {
return (
Twój koszyk jest pusty
Nie dodałeś jeszcze żadnych produktów do koszyka.
Przejdź do sklepu
);
}
return (
{items.map((item) => {
const itemPrice = item.price;
const totalGross = itemPrice * item.quantity;
return (
{/* Usuń pozycję */}
{/* Obraz */}
{/* Treść */}
{/* Opcja Montażu i Cena jednostkowa */}
{/* Ilość i Cena */}
{item.quantity}
{formatCurrency(totalGross)}
);
})}
);
}