mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 23:46:58 +00:00
15 lines
313 B
TypeScript
15 lines
313 B
TypeScript
import { getCart } from "lib/commercetools";
|
|
import { cookies } from "next/headers";
|
|
import CartModal from "./modal";
|
|
|
|
export default async function Cart() {
|
|
const cartId = cookies().get("cartId")?.value;
|
|
let cart;
|
|
|
|
if (cartId) {
|
|
cart = await getCart(cartId);
|
|
}
|
|
|
|
return <CartModal cart={cart} />;
|
|
}
|