forked from crowetic/commerce
changes
This commit is contained in:
@@ -4,11 +4,10 @@ import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import s from './CartItem.module.css'
|
||||
import { Trash, Plus, Minus } from '@components/icons'
|
||||
import {useUI} from '@components/ui/context'
|
||||
import { useUI } from '@components/ui/context'
|
||||
import usePrice from '@framework/product/use-price'
|
||||
import useUpdateItem from '@framework/cart/use-update-item'
|
||||
import useRemoveItem from '@framework/cart/use-remove-item'
|
||||
import { CartItem } from 'framework/types'
|
||||
|
||||
const Item = ({
|
||||
item,
|
||||
@@ -93,7 +92,10 @@ const Item = ({
|
||||
</div>
|
||||
<div className="flex-1 flex flex-col text-base">
|
||||
<Link href={`/product/${item.url.split('/')[3]}`}>
|
||||
<span className="font-bold mb-5 text-lg cursor-pointer" onClick={() => closeSidebarIfPresent()}>
|
||||
<span
|
||||
className="font-bold mb-5 text-lg cursor-pointer"
|
||||
onClick={() => closeSidebarIfPresent()}
|
||||
>
|
||||
{item.name}
|
||||
</span>
|
||||
</Link>
|
||||
|
@@ -93,7 +93,7 @@ const CartSidebarView: FC = () => {
|
||||
My Cart
|
||||
</h2>
|
||||
<ul className="py-6 space-y-6 sm:py-0 sm:space-y-0 sm:divide-y sm:divide-accents-3 border-t border-accents-3">
|
||||
{data.products.map((item: any) => (
|
||||
{data?.products?.map((item) => (
|
||||
<CartItem
|
||||
key={item.id}
|
||||
item={item}
|
||||
|
Reference in New Issue
Block a user