import { FC } from 'react' import cn from 'classnames' import { UserNav } from '@components/common' import { Button } from '@components/ui' import { Bag, Cross, Check } from '@components/icons' import { useUI } from '@components/ui/context' import useCart from '@framework/cart/use-cart' import usePrice from '@framework/product/use-price' import CartItem from '../CartItem' import s from './CartSidebarView.module.css' const CartSidebarView: FC = () => { const { closeSidebar } = useUI() const { data, isLoading, isEmpty } = useCart() const { price: subTotal } = usePrice( data && { amount: Number(data.subtotalPrice), currencyCode: data.currency.code, } ) const { price: total } = usePrice( data && { amount: Number(data.totalPrice), currencyCode: data.currency.code, } ) const handleClose = () => closeSidebar() const error = null const success = null return (
Biscuit oat cake wafer icing ice cream tiramisu pudding cupcake.