import repeat from "@lib/util/repeat" import { HttpTypes } from "@medusajs/types" import { Heading, Table } from "@modules/common/components/ui" import Item from "@modules/cart/components/item" import SkeletonLineItem from "@modules/skeletons/components/skeleton-line-item" type ItemsTemplateProps = { cart?: HttpTypes.StoreCart } const ItemsTemplate = ({ cart }: ItemsTemplateProps) => { const items = cart?.items return (
Cart
Item Quantity Price Total {items ? items .sort((a, b) => { return (a.created_at ?? "") > (b.created_at ?? "") ? -1 : 1 }) .map((item) => { return ( ) }) : repeat(5).map((i) => { return })}
) } export default ItemsTemplate