import { getCart } from '@/lib/sfcc'; import { CartItem } from '@/lib/sfcc/types'; import { ShoppingCart } from 'lucide-react'; import { cookies } from 'next/headers'; import Image from 'next/image'; import Link from 'next/link'; import Price from '../price'; import { buttonVariants } from '../ui/button'; import { Separator } from '../ui/separator'; export async function CheckoutCart() { const cartId = cookies().get('cartId')?.value; const cart = await getCart(cartId); if (!cart || cart.lines.length === 0) { return ; } const { cost } = cart; return (
{cart.lines.map((line) => ( ))}
Taxes
Subtotal
Shipping Calulated during Shipping
Total
); } function EmptyCart() { return (

Your cart is empty

Looks like you haven't added any items to your cart yet.

Continue Shopping
); } function Line({ line }: { line: CartItem }) { return (
{line.merchandise.product.featuredImage.altText}

{line.merchandise.title}

{/*

{line.merchandise.product.description}

*/}
Qty: {line.quantity}
); }