import { getCart } from "@/lib/sfcc"; import { CartItem } from "@/lib/sfcc/types"; import { ShoppingCart } from "lucide-react"; 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 cart = await getCart(); if (!cart || cart.lines.length === 0) { return ; } const { cost } = cart; return (
{cart.lines.map((line) => ( ))}
Taxes
Subtotal
Shipping Calculated 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}
); }