2023-08-31 20:59:02 -07:00

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} />;
}