diff --git a/components/cart/CartSidebarView/CartSidebarView.module.css b/components/cart/CartSidebarView/CartSidebarView.module.css
index 1ad1acdd7..2b36d283d 100644
--- a/components/cart/CartSidebarView/CartSidebarView.module.css
+++ b/components/cart/CartSidebarView/CartSidebarView.module.css
@@ -1,7 +1,3 @@
-.root {
- @apply h-full flex flex-col relative w-full relative;
-}
-
.root.empty {
@apply bg-secondary text-secondary;
}
@@ -13,3 +9,7 @@
.root.error {
@apply bg-red text-white;
}
+
+.lineItemsList {
+ @apply py-4 space-y-6 sm:py-0 sm:space-y-0 sm:divide-y sm:divide-accent-2 border-accent-2;
+}
diff --git a/components/cart/CartSidebarView/CartSidebarView.tsx b/components/cart/CartSidebarView/CartSidebarView.tsx
index d9a6dd6fb..9cf99cf9b 100644
--- a/components/cart/CartSidebarView/CartSidebarView.tsx
+++ b/components/cart/CartSidebarView/CartSidebarView.tsx
@@ -3,12 +3,12 @@ import Link from 'next/link'
import { FC } from 'react'
import s from './CartSidebarView.module.css'
import CartItem from '../CartItem'
-import { Button } from '@components/ui'
-import { UserNav } from '@components/common'
+import { Button, Text } from '@components/ui'
import { useUI } from '@components/ui/context'
import { Bag, Cross, Check } from '@components/icons'
import useCart from '@framework/cart/use-cart'
import usePrice from '@framework/product/use-price'
+import SidebarLayout from '@components/common/SidebarLayout'
const CartSidebarView: FC = () => {
const { closeSidebar, setSidebarView } = useUI()
@@ -33,31 +33,12 @@ const CartSidebarView: FC = () => {
const success = null
return (
-
-
-
-
-
-
-
-
-
-
-
-
{isLoading || isEmpty ? (
@@ -93,14 +74,11 @@ const CartSidebarView: FC = () => {
<>
-
+
My Cart
-
+
-
+
{data!.lineItems.map((item: any) => (
{
>
)}
-
+
)
}
diff --git a/components/checkout/CheckoutSidebarView/CheckoutSidebarView.module.css b/components/checkout/CheckoutSidebarView/CheckoutSidebarView.module.css
index 3f66cb0cc..36bd4eb49 100644
--- a/components/checkout/CheckoutSidebarView/CheckoutSidebarView.module.css
+++ b/components/checkout/CheckoutSidebarView/CheckoutSidebarView.module.css
@@ -1,3 +1,3 @@
-.root {
- @apply h-full flex flex-col relative w-full relative;
+.lineItemsList {
+ @apply py-4 space-y-6 sm:py-0 sm:space-y-0 sm:divide-y sm:divide-accent-2 border-accent-2;
}
diff --git a/components/checkout/CheckoutSidebarView/CheckoutSidebarView.tsx b/components/checkout/CheckoutSidebarView/CheckoutSidebarView.tsx
index c78a4174f..d17f46b28 100644
--- a/components/checkout/CheckoutSidebarView/CheckoutSidebarView.tsx
+++ b/components/checkout/CheckoutSidebarView/CheckoutSidebarView.tsx
@@ -1,26 +1,19 @@
import cn from 'classnames'
import Link from 'next/link'
import { FC } from 'react'
-import s from './CheckoutSidebarView.module.css'
import CartItem from '@components/cart/CartItem'
-import { Button } from '@components/ui'
-import { UserNav } from '@components/common'
+import { Button, Text } from '@components/ui'
import { useUI } from '@components/ui/context'
-import {
- Bag,
- Cross,
- Check,
- MapPin,
- CreditCard,
- ChevronLeft,
- ChevronRight,
-} from '@components/icons'
import useCart from '@framework/cart/use-cart'
import usePrice from '@framework/product/use-price'
+import ShippingWidget from '../ShippingWidget'
+import PaymentWidget from '../PaymentWidget'
+import SidebarLayout from '@components/common/SidebarLayout'
+import s from './CheckoutSidebarView.module.css'
const CheckoutSidebarView: FC = () => {
- const { closeSidebar, setSidebarView } = useUI()
- const { data, isLoading, isEmpty } = useCart()
+ const { setSidebarView } = useUI()
+ const { data } = useCart()
const { price: subTotal } = usePrice(
data && {
@@ -34,160 +27,59 @@ const CheckoutSidebarView: FC = () => {
currencyCode: data.currency.code,
}
)
- const handleClose = () => closeSidebar()
-
- const error = null
- const success = null
return (
-