mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 16:07:01 +00:00
19 lines
360 B
TypeScript
19 lines
360 B
TypeScript
import { getCart } from 'components/cart/actions';
|
|
import CartModal from './modal';
|
|
import { transformCart } from 'lib/shopware/transform';
|
|
|
|
export default async function Cart() {
|
|
let cart;
|
|
const resCart = await getCart();
|
|
|
|
if (resCart) {
|
|
cart = transformCart(resCart);
|
|
}
|
|
|
|
if (!cart) {
|
|
return null;
|
|
}
|
|
|
|
return <CartModal cart={cart} />;
|
|
}
|