import { FC } from 'react' import cn from 'classnames' import { UserNav } from '@components/core' import { Button } from '@components/ui' import { ArrowLeft, Bag, Cross, Check } from '@components/icon' import { useUI } from '@components/ui/context' import { useCart } from '@lib/bigcommerce/cart' import CartItem from '../CartItem' import Link from '@components/ui/Link' const CartSidebarView: FC = () => { const { data, isEmpty } = useCart() const { closeSidebar } = useUI() const items = data?.line_items.physical_items ?? [] const handleClose = () => closeSidebar() console.log('CART', data, isEmpty) // This should come from the API via hook I guess const error = null const success = null return (
{isEmpty ? (

Your cart is empty.

) : error ? (

We couldn’t process the purchase. Please check your card information and try again.

) : success ? (

Thank you for your order.

) : ( <>

My Cart

)}
) } export default CartSidebarView