mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 16:07:01 +00:00
feat(poc): change types for cart component
This commit is contained in:
parent
d24146d45e
commit
d61acff7d1
@ -3,7 +3,7 @@ import LoadingDots from 'components/loading-dots';
|
|||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
|
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import type { CartItem } from 'lib/shopify/types';
|
import type { CartItem } from 'lib/shopware/types';
|
||||||
import { useTransition } from 'react';
|
import { useTransition } from 'react';
|
||||||
import { removeItem } from 'components/cart/actions';
|
import { removeItem } from 'components/cart/actions';
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import { removeItem, updateItemQuantity } from 'components/cart/actions';
|
|||||||
import MinusIcon from 'components/icons/minus';
|
import MinusIcon from 'components/icons/minus';
|
||||||
import PlusIcon from 'components/icons/plus';
|
import PlusIcon from 'components/icons/plus';
|
||||||
import LoadingDots from 'components/loading-dots';
|
import LoadingDots from 'components/loading-dots';
|
||||||
import type { CartItem } from 'lib/shopify/types';
|
import type { CartItem } from 'lib/shopware/types';
|
||||||
|
|
||||||
export default function EditItemQuantityButton({
|
export default function EditItemQuantityButton({
|
||||||
item,
|
item,
|
||||||
|
@ -9,7 +9,7 @@ import CloseIcon from 'components/icons/close';
|
|||||||
import ShoppingBagIcon from 'components/icons/shopping-bag';
|
import ShoppingBagIcon from 'components/icons/shopping-bag';
|
||||||
import Price from 'components/price';
|
import Price from 'components/price';
|
||||||
import { DEFAULT_OPTION } from 'lib/constants';
|
import { DEFAULT_OPTION } from 'lib/constants';
|
||||||
import type { Cart } from 'lib/shopify/types';
|
import type { Cart } from 'lib/shopware/types';
|
||||||
import { createUrl } from 'lib/utils';
|
import { createUrl } from 'lib/utils';
|
||||||
import { Fragment, useEffect, useRef, useState } from 'react';
|
import { Fragment, useEffect, useRef, useState } from 'react';
|
||||||
import { useCookies } from 'react-cookie';
|
import { useCookies } from 'react-cookie';
|
||||||
@ -109,7 +109,7 @@ export default function CartModal({ cart, cartIdUpdated }: { cart: Cart; cartIdU
|
|||||||
});
|
});
|
||||||
|
|
||||||
const merchandiseUrl = createUrl(
|
const merchandiseUrl = createUrl(
|
||||||
`/product/${item.merchandise.product.handle}`,
|
`/product/${item.merchandise.product.path}`,
|
||||||
new URLSearchParams(merchandiseSearchParams)
|
new URLSearchParams(merchandiseSearchParams)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user