'use client'; import { useCartStore } from '@/lib/cart-store'; import Image from 'next/image'; import Link from 'next/link'; import { Trash2, Plus, Minus, ShoppingBag, ArrowRight } from 'lucide-react'; export default function KoszykPage() { const { items, removeItem, updateQuantity, getTotal, clearCart } = useCartStore(); const total = getTotal(); if (items.length === 0) { return (

Koszyk jest pusty

Dodaj produkty ze sklepu aby złożyć zamówienie.

); } return (

Twój koszyk

{/* Lista produktów */}
{items.map((item) => (
{item.name}

{item.brand}

{item.name}

{item.price.toLocaleString('pl-PL')} zł

{item.quantity}

{(item.price * item.quantity).toLocaleString('pl-PL')} zł

))}
{/* Podsumowanie */}

Podsumowanie

Produkty ({items.reduce((s, i) => s + i.quantity, 0)} szt.) {total.toLocaleString('pl-PL')} zł
Montaż wycena telefoniczna
Razem (urządzenia) {total.toLocaleString('pl-PL')} zł

+ koszt montażu ustalany indywidualnie

); }