mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 14:06:59 +00:00
15 lines
392 B
TypeScript
15 lines
392 B
TypeScript
import { getCart } from 'lib/shopify';
|
|
import { cookies } from 'next/headers';
|
|
import CartModal from './modal';
|
|
|
|
export default async function Cart({ country, language }: { country?: string; language?: string }) {
|
|
const cartId = cookies().get('cartId')?.value;
|
|
let cart;
|
|
|
|
if (cartId) {
|
|
cart = await getCart({ cartId, country, language });
|
|
}
|
|
|
|
return <CartModal cart={cart} />;
|
|
}
|