Shopping Cart

The Shopping Cart components are used to display and manage the items in the user's shopping cart. It is meant to be used with a modal component (see modal documentation for more information) and needs to be wrapped in a CartProvider.

Components

< ShoppingCart />

The ShoppingCart component is used to display the items in the shopping cart. It is a list of CartItem components.

When using the ShoppingCart component, remember to create a button that the user can click to open the cart modal.

< CheckoutButton />

The CheckoutButton component is used to display a button that the user can click to proceed to the checkout page. It is meant to be used inside the ShoppingCart component but can also be used in other places.

CheckoutButton Props

NameTypeDescription
userobjectThe signed in user object.

< CartItem />

The CartItem component is used to display a single item and its price in the shopping cart. It is meant to be used inside the ShoppingCart component.

CartItem Props

NameTypeDescription
item{ name: string, price: number, id: string }The item to be displayed.